From de13c3a1bc94eaa78910c418eab4e8ee80036148 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 17 Apr 2024 12:04:43 +0200 Subject: [PATCH 1/2] python312Packages.renault-api: 0.2.1 -> 0.2.2 Diff: https://github.com/hacf-fr/renault-api/compare/refs/tags/v0.2.1...v0.2.2 Changelog: https://github.com/hacf-fr/renault-api/releases/tag/v0.2.2 --- .../python-modules/renault-api/default.nix | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/renault-api/default.nix b/pkgs/development/python-modules/renault-api/default.nix index c28ef79f6d21..5d1b9ea994a6 100644 --- a/pkgs/development/python-modules/renault-api/default.nix +++ b/pkgs/development/python-modules/renault-api/default.nix @@ -3,6 +3,7 @@ , aioresponses , buildPythonPackage , click +, cryptography , dateparser , fetchFromGitHub , marshmallow-dataclass @@ -12,41 +13,52 @@ , pytest-asyncio , pytestCheckHook , tabulate +, typeguard }: buildPythonPackage rec { pname = "renault-api"; - version = "0.2.1"; + version = "0.2.2"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "hacf-fr"; - repo = pname; + repo = "renault-api"; rev = "refs/tags/v${version}"; - hash = "sha256-HDaX94XHkyrIA0hWYwcpUItEIeRK2ACvS6jg1YA6Wv4="; + hash = "sha256-FZ1VNO8gEH7HJRu9EVuKIwSQbceG720tCVqAPqHwISQ="; }; - nativeBuildInputs = [ + build-system = [ poetry-core ]; propagatedBuildInputs = [ aiohttp - click - dateparser + cryptography marshmallow-dataclass pyjwt - tabulate ]; - nativeCheckInputs = [ + dependencies = [ aioresponses pytest-asyncio - pytestCheckHook ]; + passthru.optional-dependencies = { + cli = [ + click + dateparser + tabulate + ]; + }; + + nativeCheckInputs = [ + pytestCheckHook + typeguard + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + pytestFlagsArray = [ "--asyncio-mode=auto" ]; @@ -57,10 +69,10 @@ buildPythonPackage rec { meta = with lib; { description = "Python library to interact with the Renault API"; - mainProgram = "renault-api"; homepage = "https://github.com/hacf-fr/renault-api"; changelog = "https://github.com/hacf-fr/renault-api/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; + mainProgram = "renault-api"; }; } From 0ce8b20c6eed920d028fc8eef6ad991d4063a83f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 17 Apr 2024 12:05:10 +0200 Subject: [PATCH 2/2] python312Packages.renault-api: foramt with nixfmt --- .../python-modules/renault-api/default.nix | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/pkgs/development/python-modules/renault-api/default.nix b/pkgs/development/python-modules/renault-api/default.nix index 5d1b9ea994a6..61362a5021f6 100644 --- a/pkgs/development/python-modules/renault-api/default.nix +++ b/pkgs/development/python-modules/renault-api/default.nix @@ -1,19 +1,20 @@ -{ lib -, aiohttp -, aioresponses -, buildPythonPackage -, click -, cryptography -, dateparser -, fetchFromGitHub -, marshmallow-dataclass -, poetry-core -, pyjwt -, pythonOlder -, pytest-asyncio -, pytestCheckHook -, tabulate -, typeguard +{ + lib, + aiohttp, + aioresponses, + buildPythonPackage, + click, + cryptography, + dateparser, + fetchFromGitHub, + marshmallow-dataclass, + poetry-core, + pyjwt, + pythonOlder, + pytest-asyncio, + pytestCheckHook, + tabulate, + typeguard, }: buildPythonPackage rec { @@ -30,9 +31,7 @@ buildPythonPackage rec { hash = "sha256-FZ1VNO8gEH7HJRu9EVuKIwSQbceG720tCVqAPqHwISQ="; }; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; propagatedBuildInputs = [ aiohttp @@ -59,13 +58,9 @@ buildPythonPackage rec { typeguard ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); - pytestFlagsArray = [ - "--asyncio-mode=auto" - ]; + pytestFlagsArray = [ "--asyncio-mode=auto" ]; - pythonImportsCheck = [ - "renault_api" - ]; + pythonImportsCheck = [ "renault_api" ]; meta = with lib; { description = "Python library to interact with the Renault API";