diff options
Diffstat (limited to 'pkgs/development/python-modules/zha/default.nix')
-rw-r--r-- | pkgs/development/python-modules/zha/default.nix | 83 |
1 files changed, 39 insertions, 44 deletions
diff --git a/pkgs/development/python-modules/zha/default.nix b/pkgs/development/python-modules/zha/default.nix index d6d23f46611a4..f8c83870f9f15 100644 --- a/pkgs/development/python-modules/zha/default.nix +++ b/pkgs/development/python-modules/zha/default.nix @@ -1,32 +1,33 @@ -{ lib -, awesomeversion -, bellows -, buildPythonPackage -, fetchFromGitHub -, pyserial -, pyserial-asyncio -, pyserial-asyncio-fast -, pytest-asyncio -, pytest-timeout -, pytest-xdist -, pytestCheckHook -, python-slugify -, pythonOlder -, pythonRelaxDepsHook -, setuptools -, universal-silabs-flasher -, wheel -, zha-quirks -, zigpy -, zigpy-deconz -, zigpy-xbee -, zigpy-zigate -, zigpy-znp +{ + lib, + awesomeversion, + bellows, + buildPythonPackage, + fetchFromGitHub, + freezegun, + pyserial, + pyserial-asyncio, + pyserial-asyncio-fast, + pytest-asyncio, + pytest-timeout, + pytest-xdist, + pytestCheckHook, + python-slugify, + pythonOlder, + setuptools, + universal-silabs-flasher, + wheel, + zha-quirks, + zigpy, + zigpy-deconz, + zigpy-xbee, + zigpy-zigate, + zigpy-znp, }: buildPythonPackage rec { pname = "zha"; - version = "0.0.8"; + version = "0.0.33"; pyproject = true; disabled = pythonOlder "3.12"; @@ -35,24 +36,15 @@ buildPythonPackage rec { owner = "zigpy"; repo = "zha"; rev = "refs/tags/${version}"; - hash = "sha256-xOaqwgL8NqB3pHNa6U/wextntI5aMivHLaIhSRqvgRU="; + hash = "sha256-qcXKHIiEm1wqcQKRH+TqgQMPZbLqNnBiR6dbmLwxW1Y="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail '"setuptools-git-versioning<2"' "" \ + --replace-fail '"setuptools-git-versioning<3"' "" \ --replace-fail 'dynamic = ["version"]' 'version = "${version}"' ''; - pythonRelaxDeps = [ - "universal-silabs-flasher" - "zha-quirks" - ]; - - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; - build-system = [ setuptools wheel @@ -75,15 +67,14 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + freezegun pytest-asyncio pytest-timeout pytest-xdist pytestCheckHook ]; - pythonImportsCheck = [ - "zha" - ]; + pythonImportsCheck = [ "zha" ]; disabledTests = [ # Tests are long-running and often keep hanging @@ -92,7 +83,7 @@ buildPythonPackage rec { "test_check_available_unsuccessful" "test_device_counter_sensors" "test_device_tracker" - "test_device_unavailable_skips_entity_polling" + "test_device_unavailable_or_disabled_skips_entity_polling" "test_elec_measurement_sensor_polling" "test_electrical_measurement_init" "test_group_member_assume_state" @@ -104,11 +95,15 @@ buildPythonPackage rec { "test_sinope_time" "test_siren_timed_off" "test_zha_group_light_entity" + # flaky, either due to race conditions or timeouts + "test_zha_group_switch_entity" + "test_zha_group_fan_entity" + "test_startup_concurrency_limit" + "test_fan_ikea" + "test_background" ]; - disabledTestPaths = [ - "tests/test_cluster_handlers.py" - ]; + disabledTestPaths = [ "tests/test_cluster_handlers.py" ]; pytestFlagsArray = [ "-v" @@ -119,7 +114,7 @@ buildPythonPackage rec { description = "Zigbee Home Automation"; homepage = "https://github.com/zigpy/zha"; changelog = "https://github.com/zigpy/zha/releases/tag/${version}"; - license = licenses.gpl3Only; + license = licenses.asl20; maintainers = with maintainers; [ fab ]; }; } |