Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / zha / default.nix
blobd6d23f46611a4b9d48a43940d11fea9c09dacadc
1 { lib
2 , awesomeversion
3 , bellows
4 , buildPythonPackage
5 , fetchFromGitHub
6 , pyserial
7 , pyserial-asyncio
8 , pyserial-asyncio-fast
9 , pytest-asyncio
10 , pytest-timeout
11 , pytest-xdist
12 , pytestCheckHook
13 , python-slugify
14 , pythonOlder
15 , pythonRelaxDepsHook
16 , setuptools
17 , universal-silabs-flasher
18 , wheel
19 , zha-quirks
20 , zigpy
21 , zigpy-deconz
22 , zigpy-xbee
23 , zigpy-zigate
24 , zigpy-znp
27 buildPythonPackage rec {
28   pname = "zha";
29   version = "0.0.8";
30   pyproject = true;
32   disabled = pythonOlder "3.12";
34   src = fetchFromGitHub {
35     owner = "zigpy";
36     repo = "zha";
37     rev = "refs/tags/${version}";
38     hash = "sha256-xOaqwgL8NqB3pHNa6U/wextntI5aMivHLaIhSRqvgRU=";
39   };
41   postPatch = ''
42     substituteInPlace pyproject.toml \
43       --replace-fail '"setuptools-git-versioning<2"' "" \
44       --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
45   '';
47   pythonRelaxDeps = [
48     "universal-silabs-flasher"
49     "zha-quirks"
50   ];
52   nativeBuildInputs = [
53     pythonRelaxDepsHook
54   ];
56   build-system = [
57     setuptools
58     wheel
59   ];
61   dependencies = [
62     awesomeversion
63     bellows
64     pyserial
65     pyserial-asyncio
66     pyserial-asyncio-fast
67     python-slugify
68     universal-silabs-flasher
69     zha-quirks
70     zigpy
71     zigpy-deconz
72     zigpy-xbee
73     zigpy-zigate
74     zigpy-znp
75   ];
77   nativeCheckInputs = [
78     pytest-asyncio
79     pytest-timeout
80     pytest-xdist
81     pytestCheckHook
82   ];
84   pythonImportsCheck = [
85     "zha"
86   ];
88   disabledTests = [
89     # Tests are long-running and often keep hanging
90     "test_check_available_no_basic_cluster_handler"
91     "test_check_available_success"
92     "test_check_available_unsuccessful"
93     "test_device_counter_sensors"
94     "test_device_tracker"
95     "test_device_unavailable_skips_entity_polling"
96     "test_elec_measurement_sensor_polling"
97     "test_electrical_measurement_init"
98     "test_group_member_assume_state"
99     "test_light_refresh"
100     "test_light"
101     "test_light"
102     "test_light"
103     "test_pollers_skip"
104     "test_sinope_time"
105     "test_siren_timed_off"
106     "test_zha_group_light_entity"
107   ];
109   disabledTestPaths = [
110     "tests/test_cluster_handlers.py"
111   ];
113   pytestFlagsArray = [
114     "-v"
115     "--timeout=5"
116   ];
118   meta = with lib; {
119     description = "Zigbee Home Automation";
120     homepage = "https://github.com/zigpy/zha";
121     changelog = "https://github.com/zigpy/zha/releases/tag/${version}";
122     license = licenses.gpl3Only;
123     maintainers = with maintainers; [ fab ];
124   };