nixpkgs/pkgs/development/python-modules/gentools/default.nix

32 lines
832 B
Nix
Raw Normal View History

2018-11-25 09:20:03 +00:00
{ 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;
2019-07-10 19:52:51 +00:00
homepage = https://gentools.readthedocs.io/;
2018-11-25 09:20:03 +00:00
maintainers = with maintainers; [ mredaelli ];
};
}