From efc618093bfb74565c091c6c6e6462b807faae17 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 14 Oct 2022 08:56:43 +0200 Subject: [PATCH] python310Packages.iaqualink: 0.4.1 -> 0.5.0 --- .../python-modules/iaqualink/default.nix | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/iaqualink/default.nix b/pkgs/development/python-modules/iaqualink/default.nix index 5806104d419f..3838c494cc8c 100644 --- a/pkgs/development/python-modules/iaqualink/default.nix +++ b/pkgs/development/python-modules/iaqualink/default.nix @@ -1,31 +1,52 @@ { lib -, aiohttp , buildPythonPackage , fetchFromGitHub -, pytest-runner +, hatch-vcs +, hatchling +, httpx , pytestCheckHook , pythonOlder +, respx }: buildPythonPackage rec { pname = "iaqualink"; - version = "0.4.1"; + version = "0.5.0"; + format = "pyproject"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "flz"; repo = "iaqualink-py"; rev = "v${version}"; - sha256 = "0xgxajw38jrc55xh8w8mq0dk82ml77mfs8yn05gcpv8l24y70chq"; + hash = "sha256-ewPP2Xq+ecZGc5kokvLEsRokGqTWlymrzkwk480tapk="; }; - nativeBuildInputs = [ pytest-runner ]; + SETUPTOOLS_SCM_PRETEND_VERSION = version; - propagatedBuildInputs = [ aiohttp ]; + nativeBuildInputs = [ + hatch-vcs + hatchling + ]; - checkInputs = [ pytestCheckHook ]; + propagatedBuildInputs = [ + httpx + ] ++ httpx.optional-dependencies.http2; - pythonImportsCheck = [ "iaqualink" ]; + checkInputs = [ + pytestCheckHook + respx + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "pytest --cov-config=pyproject.toml --cov-report=xml --cov-report=term --cov=src --cov=tests" "" + ''; + + pythonImportsCheck = [ + "iaqualink" + ]; meta = with lib; { description = "Python library for Jandy iAqualink";