depot/third_party/nixpkgs/pkgs/development/python-modules/pyrainbird/default.nix
Default email a3d4720129 Project import generated by Copybara.
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
2022-12-28 22:21:41 +01:00

62 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, parameterized
, pycryptodome
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
, pyyaml
, requests
, requests-mock
, responses
}:
buildPythonPackage rec {
pname = "pyrainbird";
version = "0.7.1";
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "jbarrancos";
repo = pname;
rev = version;
hash = "sha256-pN/QILpXJoQAccB7CSDLxCDYfijf/VJbYw+NRUI4kvs=";
};
postPatch = ''
substituteInPlace pytest.ini \
--replace "--cov=pyrainbird --cov-report=term-missing" ""
substituteInPlace setup.cfg \
--replace "pycryptodome>=3.16.0" "pycryptodome"
'';
propagatedBuildInputs = [
pycryptodome
pyyaml
requests
];
checkInputs = [
parameterized
pytest-aiohttp
pytestCheckHook
requests-mock
responses
];
pythonImportsCheck = [
"pyrainbird"
];
meta = with lib; {
description = "Module to interact with Rainbird controllers";
homepage = "https://github.com/jbarrancos/pyrainbird/";
changelog = "https://github.com/jbarrancos/pyrainbird/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}