btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / development / python-modules / pyrainbird / default.nix
blob1444533bb28c7a797dccf2eb62346244e4ed98ca
2   lib,
3   aiohttp-retry,
4   buildPythonPackage,
5   fetchFromGitHub,
6   freezegun,
7   ical,
8   mashumaro,
9   parameterized,
10   pycryptodome,
11   pytest-aiohttp,
12   pytest-asyncio,
13   pytest-golden,
14   pytest-mock,
15   pytestCheckHook,
16   python-dateutil,
17   pythonOlder,
18   pyyaml,
19   requests,
20   requests-mock,
21   responses,
22   setuptools,
25 buildPythonPackage rec {
26   pname = "pyrainbird";
27   version = "6.0.2";
28   pyproject = true;
30   disabled = pythonOlder "3.10";
32   src = fetchFromGitHub {
33     owner = "allenporter";
34     repo = "pyrainbird";
35     rev = "refs/tags/${version}";
36     hash = "sha256-CcoZZ60PItqy0bCc36WfyNF9Fc28aHwQ6hhnY41lBNg=";
37   };
39   postPatch = ''
40     substituteInPlace pytest.ini \
41       --replace-fail "--cov=pyrainbird --cov-report=term-missing" ""
42   '';
44   build-system = [ setuptools ];
46   dependencies = [
47     aiohttp-retry
48     ical
49     mashumaro
50     pycryptodome
51     python-dateutil
52     pyyaml
53     requests
54   ];
56   __darwinAllowLocalNetworking = true;
58   nativeCheckInputs = [
59     freezegun
60     parameterized
61     pytest-aiohttp
62     pytest-asyncio
63     pytest-golden
64     pytest-mock
65     pytestCheckHook
66     requests-mock
67     responses
68   ];
70   pythonImportsCheck = [ "pyrainbird" ];
72   meta = with lib; {
73     description = "Module to interact with Rainbird controllers";
74     homepage = "https://github.com/allenporter/pyrainbird";
75     changelog = "https://github.com/allenporter/pyrainbird/releases/tag/${version}";
76     license = with licenses; [ mit ];
77     maintainers = with maintainers; [ fab ];
78   };