python311Packages.gentools: adjust inputs

- disable on unsupported Python releases
This commit is contained in:
Fabian Affolter 2023-11-28 10:07:27 +01:00 committed by GitHub
parent 2a5388a54e
commit f3c44905d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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