about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-01-15 18:22:17 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-01-23 01:09:31 +0100
commit264113f58149755a342cf936ede23f8e96ddbeb8 (patch)
tree37db842864a94d5df0934780f45efcf83a9bd063
parent5ccfdbec3541223176e82ef5f98ef5d2ce691383 (diff)
python3Packages.hypothesis: cleanup
-rw-r--r--pkgs/development/python-modules/hypothesis/default.nix24
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/hypothesis/default.nix b/pkgs/development/python-modules/hypothesis/default.nix
index 6572ad57e110d..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
@@ -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 ];