From 4422a302ede76f45d3cc93093a2ed44f6ea40a87 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 15 May 2024 16:36:24 +0200 Subject: [PATCH] python312Packages.aioairq: refactor --- .../python-modules/aioairq/default.nix | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/aioairq/default.nix b/pkgs/development/python-modules/aioairq/default.nix index 8496eb6c9f98..0b887ccdddf9 100644 --- a/pkgs/development/python-modules/aioairq/default.nix +++ b/pkgs/development/python-modules/aioairq/default.nix @@ -3,35 +3,52 @@ , buildPythonPackage , fetchFromGitHub , pycryptodome +, pytest-asyncio +, pytestCheckHook , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "aioairq"; version = "0.4.2"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "CorantGmbH"; - repo = pname; + repo = "aioairq"; rev = "refs/tags/v${version}"; hash = "sha256-ppjhGBAoA5iV+ZfUKkUCNJRYN82JtclRe36pbe85i5w="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ aiohttp pycryptodome ]; # Module has no tests - doCheck = false; + #doCheck = false; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; pythonImportsCheck = [ "aioairq" ]; + disabledTestPaths = [ + # Tests require network access + "tests/test_core_on_device.py" + ]; + meta = with lib; { description = "Library to retrieve data from air-Q devices"; homepage = "https://github.com/CorantGmbH/aioairq";