From d9de25761781f03b9ddf8444e889ac842100af13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 22 Jun 2021 23:45:51 +0200 Subject: [PATCH 1/2] python3Packages.pyrsistent: use pytestCheckHook Also use default version of hypothesis and introduce pythonImportsCheck. --- .../python-modules/pyrsistent/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pyrsistent/default.nix b/pkgs/development/python-modules/pyrsistent/default.nix index 79f6666474e6..8a6eb47a46c7 100644 --- a/pkgs/development/python-modules/pyrsistent/default.nix +++ b/pkgs/development/python-modules/pyrsistent/default.nix @@ -3,9 +3,8 @@ , fetchPypi , isPy27 , six -, pytest_4 -, hypothesis_4 -, pytestrunner +, pytestCheckHook +, hypothesis }: buildPythonPackage rec { @@ -21,12 +20,16 @@ buildPythonPackage rec { propagatedBuildInputs = [ six ]; - checkInputs = [ pytestrunner pytest_4 hypothesis_4 ]; + checkInputs = [ pytestCheckHook hypothesis ]; postPatch = '' - substituteInPlace setup.py --replace 'pytest<5' 'pytest' + substituteInPlace setup.py \ + --replace 'pytest<5' 'pytest' \ + --replace 'hypothesis<5' 'hypothesis' ''; + pythonImportsCheck = [ "pyrsistent" ]; + meta = with lib; { homepage = "https://github.com/tobgu/pyrsistent/"; description = "Persistent/Functional/Immutable data structures"; From b4b4c2ab005ce86cf4c14beb4638a90bf2b8f47f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 22 Jun 2021 23:47:19 +0200 Subject: [PATCH 2/2] pythonPackages.hypothesis_4: drop Versioned attributes in python-packages.nix should be avoided. --- pkgs/top-level/python-packages.nix | 3 --- pkgs/top-level/python2-packages.nix | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 29913ff47bc0..ec5656aae285 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3364,9 +3364,6 @@ in { hyperopt = callPackage ../development/python-modules/hyperopt { }; - # File name is called 2.nix because this one will need to remain for Python 2. - hypothesis_4 = callPackage ../development/python-modules/hypothesis/2.nix { }; - hypothesis-auto = callPackage ../development/python-modules/hypothesis-auto { }; hypothesis = callPackage ../development/python-modules/hypothesis { }; diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index bc37fd28db08..aa20baeb4448 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -168,7 +168,7 @@ with self; with super; { http_signature = callPackage ../development/python-modules/http_signature { }; - hypothesis = super.hypothesis_4; + hypothesis = callPackage ../development/python-modules/hypothesis/2.nix { }; idna = callPackage ../development/python-modules/idna/2.nix { };