summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-02-19 19:32:23 +0100
committerGitHub <noreply@github.com>2021-02-19 19:32:23 +0100
commitf558ed1ea50223e322bda85b4c463ea79253bc79 (patch)
treebdc529d1cccb839d57bc6511320643819caf26a4
parentdaab056dd9ff8cae6f7f0a0e96026280f0baccce (diff)
parent77cf2ac9364d7060bbd419d98cc5250d86a1ecd8 (diff)
downloadnixpkgs-f558ed1ea50223e322bda85b4c463ea79253bc79.tar
nixpkgs-f558ed1ea50223e322bda85b4c463ea79253bc79.tar.gz
nixpkgs-f558ed1ea50223e322bda85b4c463ea79253bc79.tar.bz2
nixpkgs-f558ed1ea50223e322bda85b4c463ea79253bc79.tar.lz
nixpkgs-f558ed1ea50223e322bda85b4c463ea79253bc79.tar.xz
nixpkgs-f558ed1ea50223e322bda85b4c463ea79253bc79.tar.zst
nixpkgs-f558ed1ea50223e322bda85b4c463ea79253bc79.zip
Merge pull request #112854 from mweinelt/python/fixtures
-rw-r--r--pkgs/development/python-modules/fixtures/default.nix25
1 files changed, 22 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/fixtures/default.nix b/pkgs/development/python-modules/fixtures/default.nix
index 9f1549e98f9..e802dbaa269 100644
--- a/pkgs/development/python-modules/fixtures/default.nix
+++ b/pkgs/development/python-modules/fixtures/default.nix
@@ -1,11 +1,12 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, fetchpatch
+, pythonAtLeast
 , pbr
 , testtools
 , mock
 , python
-, isPy39
 }:
 
 buildPythonPackage rec {
@@ -17,7 +18,26 @@ buildPythonPackage rec {
     sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef";
   };
 
-  propagatedBuildInputs = [ pbr testtools mock ];
+  patches = lib.optional (pythonAtLeast "3.9") [
+    # drop tests that try to monkeypatch a classmethod, which fails on python3.9
+    # https://github.com/testing-cabal/fixtures/issues/44
+    (fetchpatch {
+       url = "https://salsa.debian.org/openstack-team/python/python-fixtures/-/raw/debian/victoria/debian/patches/remove-broken-monkey-patch-test.patch";
+       sha256 = "1s3hg2zmqc4shmnf90kscphzj5qlqpxghzw2a59p8f88zrbsj97r";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pbr
+  ];
+
+  propagatedBuildInputs = [
+    testtools
+  ];
+
+  checkInputs = [
+    mock
+  ];
 
   checkPhase = ''
     ${python.interpreter} -m testtools.run fixtures.test_suite
@@ -27,6 +47,5 @@ buildPythonPackage rec {
     description = "Reusable state for writing clean tests and more";
     homepage = "https://pypi.python.org/pypi/fixtures";
     license = lib.licenses.asl20;
-    broken = isPy39; # see https://github.com/testing-cabal/fixtures/issues/44
   };
 }