2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
31 lines
863 B
Nix
31 lines
863 B
Nix
{ buildPythonPackage, lib, fetchFromGitHub, pytest
|
|
, typing ? null, funcsigs ? null, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "gentools";
|
|
version = "1.2.1";
|
|
|
|
# Pypi doesn't ship the tests, so we fetch directly from GitHub
|
|
src = fetchFromGitHub {
|
|
owner = "ariebovenberg";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "sha256-RBUIji3FOIRjfp4t7zBAVSeiWaYufz4ID8nTWmhDkf8=";
|
|
};
|
|
|
|
propagatedBuildInputs =
|
|
lib.optionals (pythonOlder "3.5") [ typing ] ++
|
|
lib.optionals (pythonOlder "3.4") [ funcsigs ];
|
|
|
|
nativeCheckInputs = [ 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 ];
|
|
};
|
|
|
|
}
|