python311Packages.gentools: adjust inputs

- disable on unsupported Python releases

(cherry picked from commit f3c44905d8)
This commit is contained in:
Fabian Affolter
2023-11-28 10:07:27 +01:00
committed by github-actions[bot]
parent f2448398e1
commit 3cc5e9a9b9

View File

@@ -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";