1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 importlib-metadata,
6 poetry-core,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "gentools";
13 version = "1.2.2";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "ariebovenberg";
20 repo = "gentools";
21 tag = "v${version}";
22 hash = "sha256-+6KTFxOpwvGOCqy6JU87gOZmDa6MvjR10qES5wIfrjI=";
23 };
24
25 nativeBuildInputs = [ poetry-core ];
26
27 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 pythonImportsCheck = [ "gentools" ];
32
33 meta = with lib; {
34 description = "Tools for generators, generator functions, and generator-based coroutines";
35 homepage = "https://gentools.readthedocs.io/";
36 changelog = "https://github.com/ariebovenberg/gentools/blob/v${version}/CHANGELOG.rst";
37 license = licenses.mit;
38 maintainers = with maintainers; [ ];
39 };
40}