diff --git a/pkgs/development/python-modules/twentemilieu/default.nix b/pkgs/development/python-modules/twentemilieu/default.nix index f91d96c0658e..4f0c5322a73f 100644 --- a/pkgs/development/python-modules/twentemilieu/default.nix +++ b/pkgs/development/python-modules/twentemilieu/default.nix @@ -1,14 +1,15 @@ { lib, - buildPythonPackage, - pythonOlder, - fetchFromGitHub, aiohttp, - yarl, aresponses, + buildPythonPackage, + fetchFromGitHub, poetry-core, pytest-asyncio, + pytest-cov-stub, pytestCheckHook, + pythonOlder, + yarl, }: buildPythonPackage rec { @@ -26,8 +27,8 @@ buildPythonPackage rec { }; postPatch = '' + # Upstream is creating GitHub releases without version substituteInPlace pyproject.toml \ - --replace "--cov" "" \ --replace '"0.0.0"' '"${version}"' ''; @@ -41,6 +42,7 @@ buildPythonPackage rec { nativeCheckInputs = [ aresponses pytest-asyncio + pytest-cov-stub pytestCheckHook ]; diff --git a/pkgs/development/python-modules/weconnect-mqtt/default.nix b/pkgs/development/python-modules/weconnect-mqtt/default.nix index 910009e6a233..19a2cd2fb32b 100644 --- a/pkgs/development/python-modules/weconnect-mqtt/default.nix +++ b/pkgs/development/python-modules/weconnect-mqtt/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, fetchFromGitHub, paho-mqtt_2, + pytest-cov-stub, pytestCheckHook, python-dateutil, pythonOlder, @@ -30,8 +31,7 @@ buildPythonPackage rec { substituteInPlace requirements.txt \ --replace-fail "weconnect[Images]~=" "weconnect>=" substituteInPlace pytest.ini \ - --replace-fail "--cov=weconnect_mqtt --cov-config=.coveragerc --cov-report html" "" \ - --replace-fail "pytest-cov" "" + --replace-fail "required_plugins = pytest-cov" "" ''; pythonRelaxDeps = [ "python-dateutil" ]; @@ -44,7 +44,10 @@ buildPythonPackage rec { weconnect ] ++ weconnect.optional-dependencies.Images; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "weconnect_mqtt" ]; @@ -52,7 +55,7 @@ buildPythonPackage rec { description = "Python client that publishes data from Volkswagen WeConnect"; homepage = "https://github.com/tillsteinbach/WeConnect-mqtt"; changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v${version}"; - license = with lib.licenses; [ mit ]; + license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; mainProgram = "weconnect-mqtt"; }; diff --git a/pkgs/development/python-modules/weconnect/default.nix b/pkgs/development/python-modules/weconnect/default.nix index ea09e36a8647..c4d08efb46d7 100644 --- a/pkgs/development/python-modules/weconnect/default.nix +++ b/pkgs/development/python-modules/weconnect/default.nix @@ -5,6 +5,7 @@ fetchFromGitHub, oauthlib, pillow, + pytest-cov-stub, pytestCheckHook, pythonOlder, requests, @@ -32,13 +33,12 @@ buildPythonPackage rec { --replace-fail "setup_requires=SETUP_REQUIRED" "setup_requires=[]" \ --replace-fail "tests_require=TEST_REQUIRED" "tests_require=[]" substituteInPlace pytest.ini \ - --replace-fail "--cov=weconnect --cov-config=.coveragerc --cov-report html" "" \ --replace-fail "required_plugins = pytest-cov" "" ''; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ oauthlib requests ]; @@ -50,7 +50,10 @@ buildPythonPackage rec { ]; }; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "weconnect" ]; @@ -58,7 +61,7 @@ buildPythonPackage rec { description = "Python client for the Volkswagen WeConnect Services"; homepage = "https://github.com/tillsteinbach/WeConnect-python"; changelog = "https://github.com/tillsteinbach/WeConnect-python/releases/tag/v${version}"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } diff --git a/pkgs/development/python-modules/withings-api/default.nix b/pkgs/development/python-modules/withings-api/default.nix index 8f35b3798f7e..9c589fd060e8 100644 --- a/pkgs/development/python-modules/withings-api/default.nix +++ b/pkgs/development/python-modules/withings-api/default.nix @@ -1,21 +1,22 @@ { lib, + arrow, buildPythonPackage, - pythonOlder, fetchFromGitHub, poetry-core, - arrow, - requests-oauthlib, - typing-extensions, pydantic, - responses, + pytest-cov-stub, pytestCheckHook, + pythonOlder, + requests-oauthlib, + responses, + typing-extensions, }: buildPythonPackage rec { pname = "withings-api"; version = "2.4.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -28,13 +29,12 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ - --replace 'requests-oauth = ">=0.4.1"' ''' \ - --replace 'addopts = "--capture no --cov ./withings_api --cov-report html:build/coverage_report --cov-report term --cov-report xml:build/coverage.xml"' ''' + --replace-fail 'requests-oauth = ">=0.4.1"' ''' ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ arrow requests-oauthlib typing-extensions @@ -42,13 +42,17 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + pytest-cov-stub pytestCheckHook responses ]; + pythonImportsCheck = [ "withings_api" ]; + meta = with lib; { description = "Library for the Withings Health API"; homepage = "https://github.com/vangorra/python_withings_api"; + changelog = "https://github.com/vangorra/python_withings_api/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ kittywitch ]; broken = versionAtLeast pydantic.version "2";