Skip to content

Commit

Permalink
python311Packages.gentools: switch to pyproject; fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
annalee committed Nov 28, 2023
1 parent 9aaa0ca commit 6d2cb96
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions pkgs/development/python-modules/gentools/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{ buildPythonPackage, lib, fetchFromGitHub, pytest
, typing ? null, funcsigs ? null, pythonOlder
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, pythonOlder
, typing ? null
, funcsigs ? null
}:

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

# Pypi doesn't ship the tests, so we fetch directly from GitHub
src = fetchFromGitHub {
Expand All @@ -14,18 +21,20 @@ buildPythonPackage rec {
sha256 = "sha256-RBUIji3FOIRjfp4t7zBAVSeiWaYufz4ID8nTWmhDkf8=";
};

nativeBuildInputs = [ poetry-core ];

propagatedBuildInputs =
lib.optionals (pythonOlder "3.5") [ typing ] ++
lib.optionals (pythonOlder "3.4") [ funcsigs ];

nativeCheckInputs = [ pytest ];
checkPhase = "pytest";
nativeCheckInputs = [ pytestCheckHook ];

pythonImportCheck = [ "gentools" ];

meta = with lib; {
description = "Tools for generators, generator functions, and generator-based coroutines";
license = licenses.mit;
homepage = "https://gentools.readthedocs.io/";
maintainers = with maintainers; [ mredaelli ];
};

}

0 comments on commit 6d2cb96

Please sign in to comment.