summary refs log tree commit diff
path: root/pkgs/development/python-modules/gentools/default.nix
blob: 57105f87a7c069365c482455cecb1d086c2433f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ buildPythonPackage, lib, fetchFromGitHub, pytest
, typing, funcsigs, pythonOlder
}:

buildPythonPackage rec {
  pname = "gentools";
  version = "1.1.0";

  # Pypi doesn't ship the tests, so we fetch directly from GitHub
  src = fetchFromGitHub {
    owner = "ariebovenberg";
    repo = pname;
    rev = "v${version}";
    sha256 = "1sm6cqi7fv2k3pc68r7wvvjjz8y6cjmz8bvxgqfa4v4wxibwnwrl";
  };

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

  checkInputs = [ pytest ];
  checkPhase = "pytest";

  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 ];
  };

}