depot/third_party/nixpkgs/pkgs/development/python-modules/gentools/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

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