1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, parameterized
5, pycryptodome
6, pytestCheckHook
7, pythonOlder
8, pyyaml
9, requests
10, requests-mock
11, responses
12}:
13
14buildPythonPackage rec {
15 pname = "pyrainbird";
16 version = "0.6.2";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.9";
20
21 src = fetchFromGitHub {
22 owner = "jbarrancos";
23 repo = pname;
24 rev = version;
25 hash = "sha256-MikJDW5Fo2DNpn9/Hyc1ecIIMEwE8GD5LKpka2t7aCk=";
26 };
27
28 postPatch = ''
29 substituteInPlace pytest.ini \
30 --replace "--cov=pyrainbird --cov-report=term-missing" ""
31 '';
32
33 propagatedBuildInputs = [
34 pycryptodome
35 pyyaml
36 requests
37 ];
38
39 checkInputs = [
40 parameterized
41 pytestCheckHook
42 requests-mock
43 responses
44 ];
45
46 pythonImportsCheck = [
47 "pyrainbird"
48 ];
49
50 meta = with lib; {
51 description = "Module to interact with Rainbird controllers";
52 homepage = "https://github.com/jbarrancos/pyrainbird/";
53 license = with licenses; [ mit ];
54 maintainers = with maintainers; [ fab ];
55 };
56}