Skip to content

Commit

Permalink
python311Packages.gentools: adjust inputs
Browse files Browse the repository at this point in the history
- disable on unsupported Python releases
  • Loading branch information
fabaff authored Nov 28, 2023
1 parent 2a5388a commit f3c4490
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions pkgs/development/python-modules/gentools/default.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, importlib-metadata
, poetry-core
, pytestCheckHook
, pythonOlder
, typing ? null
, funcsigs ? null
}:

buildPythonPackage rec {
pname = "gentools";
version = "1.2.1";
pyproject = true;

disabled = pythonOlder "3.7";

src = fetchFromGitHub {
owner = "ariebovenberg";
repo = "gentools";
rev = "refs/tags/v${version}";
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";
Expand Down

0 comments on commit f3c4490

Please sign in to comment.