diff options
Diffstat (limited to 'pkgs/development/python-modules/hypothesis')
-rw-r--r-- | pkgs/development/python-modules/hypothesis/2.nix | 45 | ||||
-rw-r--r-- | pkgs/development/python-modules/hypothesis/default.nix | 28 |
2 files changed, 21 insertions, 52 deletions
diff --git a/pkgs/development/python-modules/hypothesis/2.nix b/pkgs/development/python-modules/hypothesis/2.nix deleted file mode 100644 index 47bc8860bc54f..0000000000000 --- a/pkgs/development/python-modules/hypothesis/2.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ lib, buildPythonPackage, fetchFromGitHub -, isPy3k, attrs, coverage, enum34, pexpect -, doCheck ? true, pytest, pytest-xdist, flaky, mock -, sortedcontainers -}: -buildPythonPackage rec { - # https://hypothesis.readthedocs.org/en/latest/packaging.html - - # Hypothesis has optional dependencies on the following libraries - # pytz fake_factory django numpy pytest - # If you need these, you can just add them to your environment. - - version = "4.57.1"; - pname = "hypothesis"; - - # Use github tarballs that includes tests - src = fetchFromGitHub { - owner = "HypothesisWorks"; - repo = "hypothesis-python"; - rev = "hypothesis-python-${version}"; - sha256 = "1qcpcrk6892hzyjsdr581pw6i4fj9035nv89mcjrcrzcmycdlfds"; - }; - - postUnpack = "sourceRoot=$sourceRoot/hypothesis-python"; - - propagatedBuildInputs = [ - attrs - coverage - sortedcontainers - ] ++ lib.optional (!isPy3k) enum34; - - checkInputs = [ pytest pytest-xdist flaky mock pexpect ]; - inherit doCheck; - - checkPhase = '' - rm tox.ini # This file changes how py.test runs and breaks it - py.test tests/cover - ''; - - meta = with lib; { - description = "A Python library for property based testing"; - homepage = "https://github.com/HypothesisWorks/hypothesis"; - license = licenses.mpl20; - }; -} diff --git a/pkgs/development/python-modules/hypothesis/default.nix b/pkgs/development/python-modules/hypothesis/default.nix index 4cf8acf708725..89aac153172d7 100644 --- a/pkgs/development/python-modules/hypothesis/default.nix +++ b/pkgs/development/python-modules/hypothesis/default.nix @@ -9,6 +9,7 @@ , pytest-xdist , sortedcontainers , tzdata +, pythonOlder }: buildPythonPackage rec { # https://hypothesis.readthedocs.org/en/latest/packaging.html @@ -18,14 +19,16 @@ buildPythonPackage rec { # If you need these, you can just add them to your environment. pname = "hypothesis"; - version = "6.27.1"; + version = "6.35.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; - # Use github tarballs that includes tests src = fetchFromGitHub { owner = "HypothesisWorks"; repo = "hypothesis-python"; rev = "hypothesis-python-${version}"; - sha256 = "05kfz041vrd9fy8gl8ch05g806jj4j6l1cnwhqgygagn9z3aq1jx"; + sha256 = "08wph7q3c08480ma2p7m7mamy0g7g7r5jqpwdyhdga4cfg734527"; }; postUnpack = "sourceRoot=$sourceRoot/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 ]; |