diff --git a/pkgs/development/python-modules/zodb/default.nix b/pkgs/development/python-modules/zodb/default.nix index c23f332638d0..848da5b21717 100644 --- a/pkgs/development/python-modules/zodb/default.nix +++ b/pkgs/development/python-modules/zodb/default.nix @@ -4,7 +4,6 @@ , zope_testrunner , transaction , six -, wheel , zope_interface , zodbpickle , zconfig @@ -24,15 +23,16 @@ buildPythonPackage rec { }; patches = [ - ./ZODB-5.3.0-fix-tests.patch + ./ZODB-5.3.0-fix-tests.patch # still needeed with 5.4.0 + # Upstream patch to fix tests with persistent 4.4, + # cannot fetchpatch because only one hunk of the upstream commit applies. + # TODO remove on next release + ./fix-tests-with-persistent-4.4.patch ]; propagatedBuildInputs = [ - manuel transaction - zope_testrunner six - wheel zope_interface zodbpickle zconfig @@ -41,6 +41,11 @@ buildPythonPackage rec { BTrees ]; + checkInputs = [ + manuel + zope_testrunner + ]; + meta = with stdenv.lib; { description = "Zope Object Database: object database and persistence"; homepage = https://pypi.python.org/pypi/ZODB; diff --git a/pkgs/development/python-modules/zodb/fix-tests-with-persistent-4.4.patch b/pkgs/development/python-modules/zodb/fix-tests-with-persistent-4.4.patch new file mode 100644 index 000000000000..57946dd29863 --- /dev/null +++ b/pkgs/development/python-modules/zodb/fix-tests-with-persistent-4.4.patch @@ -0,0 +1,26 @@ +From 2d0ae7199501795617a82a32bafe19b4b5ae89c3 Mon Sep 17 00:00:00 2001 +From: Jason Madden +Date: Wed, 22 Aug 2018 10:43:19 -0500 +Subject: [PATCH] Fix tests with, and depend on, persistent 4.4. + +Fixes #213. +--- + src/ZODB/tests/util.py | 5 +++++ + 3 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/src/ZODB/tests/util.py b/src/ZODB/tests/util.py +index 4ffde92c1..e9bf547fa 100644 +--- a/src/ZODB/tests/util.py ++++ b/src/ZODB/tests/util.py +@@ -37,6 +37,11 @@ + r"\1"), + (re.compile('b(".*?")'), + r"\1"), ++ # Persistent 4.4 changes the repr of persistent subclasses, ++ # and it is slightly different with the C extension and ++ # pure-Python module ++ (re.compile('ZODB.tests.testcrossdatabasereferences.'), ++ ''), + # Python 3 adds module name to exceptions. + (re.compile("ZODB.interfaces.BlobError"), + r"BlobError"),