From 3cc5e9a9b92cbc9208e5be1eecfa2b249dae7fbb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 28 Nov 2023 10:07:27 +0100 Subject: [PATCH] python311Packages.gentools: adjust inputs - disable on unsupported Python releases (cherry picked from commit f3c44905d8f10582ca81dfff509705e3c961c796) --- .../python-modules/gentools/default.nix | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/gentools/default.nix b/pkgs/development/python-modules/gentools/default.nix index 8fbf4a788fe9..6d2ae215eafa 100644 --- a/pkgs/development/python-modules/gentools/default.nix +++ b/pkgs/development/python-modules/gentools/default.nix @@ -1,11 +1,10 @@ { lib , buildPythonPackage , fetchFromGitHub +, importlib-metadata , poetry-core , pytestCheckHook , pythonOlder -, typing ? null -, funcsigs ? null }: buildPythonPackage rec { @@ -13,6 +12,8 @@ buildPythonPackage rec { version = "1.2.1"; pyproject = true; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub { owner = "ariebovenberg"; repo = "gentools"; @@ -20,15 +21,21 @@ buildPythonPackage rec { hash = "sha256-RBUIji3FOIRjfp4t7zBAVSeiWaYufz4ID8nTWmhDkf8="; }; - nativeBuildInputs = [ poetry-core ]; + nativeBuildInputs = [ + poetry-core + ]; - propagatedBuildInputs = - lib.optionals (pythonOlder "3.5") [ typing ] ++ - lib.optionals (pythonOlder "3.4") [ funcsigs ]; + propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ + importlib-metadata + ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + ]; - pythonImportCheck = [ "gentools" ]; + pythonImportCheck = [ + "gentools" + ]; meta = with lib; { description = "Tools for generators, generator functions, and generator-based coroutines";