about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2019-07-13 04:20:00 -0500
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2019-08-13 09:18:25 +0200
commit2b78d54c821494b79c574726658bcdb0ee14b5fe (patch)
treec26f9e39b3a1fcd53339866730f8bfd0df7742c5
parent4754ca7d2ee695d660a1dbfc3f8e879306b01bcf (diff)
downloadnixlib-2b78d54c821494b79c574726658bcdb0ee14b5fe.tar
nixlib-2b78d54c821494b79c574726658bcdb0ee14b5fe.tar.gz
nixlib-2b78d54c821494b79c574726658bcdb0ee14b5fe.tar.bz2
nixlib-2b78d54c821494b79c574726658bcdb0ee14b5fe.tar.lz
nixlib-2b78d54c821494b79c574726658bcdb0ee14b5fe.tar.xz
nixlib-2b78d54c821494b79c574726658bcdb0ee14b5fe.tar.zst
nixlib-2b78d54c821494b79c574726658bcdb0ee14b5fe.zip
python3Packages.matchpy: fix build with pytest 4
-rw-r--r--pkgs/development/python-modules/matchpy/default.nix18
1 files changed, 15 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/matchpy/default.nix b/pkgs/development/python-modules/matchpy/default.nix
index a9f37b52c1b4..2a0544cf6d8f 100644
--- a/pkgs/development/python-modules/matchpy/default.nix
+++ b/pkgs/development/python-modules/matchpy/default.nix
@@ -1,9 +1,10 @@
 { lib
 , buildPythonPackage
+, fetchpatch
 , fetchPypi
 , hopcroftkarp
 , multiset
-, pytest_3
+, pytest
 , pytestrunner
 , hypothesis
 , setuptools_scm
@@ -20,12 +21,23 @@ buildPythonPackage rec {
     sha256 = "1vvf1cd9kw5z1mzvypc9f030nd18lgvvjc8j56b1s9b7dyslli2r";
   };
 
+  patches = [
+    # Fix tests for pytest 4. Remove with the next release
+    (fetchpatch {
+      url = "https://github.com/HPAC/matchpy/commit/b405a2717a7793d58c47b2e2197d9d00c06fb13c.patch";
+      includes = [ "tests/conftest.py" ];
+      sha256 = "1b6gqf2vy9qxg384nqr9k8il335afhbdmlyx4vhd8r8rqpv7gax9";
+    })
+  ];
+
   postPatch = ''
-    substituteInPlace setup.cfg --replace "hypothesis>=3.6,<4.0" "hypothesis"
+    substituteInPlace setup.cfg \
+       --replace "hypothesis>=3.6,<4.0" "hypothesis" \
+       --replace "pytest>=3.0,<4.0" "pytest"
   '';
 
   buildInputs = [ setuptools_scm pytestrunner ];
-  checkInputs = [ pytest_3 hypothesis ];
+  checkInputs = [ pytest hypothesis ];
   propagatedBuildInputs = [ hopcroftkarp multiset ];
 
   meta = with lib; {