python3Packages.hypothesis: cleanup

This commit is contained in:
Fabian Affolter 2022-01-15 18:22:17 +01:00 committed by Martin Weinelt
parent 5ccfdbec35
commit 264113f581

View file

@ -9,6 +9,7 @@
, pytest-xdist
, sortedcontainers
, tzdata
, pythonOlder
}:
buildPythonPackage rec {
# https://hypothesis.readthedocs.org/en/latest/packaging.html
@ -19,8 +20,10 @@ buildPythonPackage rec {
pname = "hypothesis";
version = "6.35.0";
format = "setuptools";
disabled = pythonOlder "3.7";
# Use github tarballs that includes tests
src = fetchFromGitHub {
owner = "HypothesisWorks";
repo = "hypothesis-python";
@ -35,8 +38,13 @@ buildPythonPackage rec {
sortedcontainers
];
checkInputs = [ pytestCheckHook pytest-xdist pexpect ]
++ lib.optional (pythonAtLeast "3.9") tzdata;
checkInputs = [
pexpect
pytest-xdist
pytestCheckHook
] ++ lib.optional (pythonAtLeast "3.9") [
tzdata
];
inherit doCheck;
@ -45,10 +53,16 @@ buildPythonPackage rec {
rm tox.ini
'';
pytestFlagsArray = [ "tests/cover" ];
pytestFlagsArray = [
"tests/cover"
];
pythonImportsCheck = [
"hypothesis"
];
meta = with lib; {
description = "A Python library for property based testing";
description = "Library for property based testing";
homepage = "https://github.com/HypothesisWorks/hypothesis";
license = licenses.mpl20;
maintainers = with maintainers; [ SuperSandro2000 ];