summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-06-27 17:02:19 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-06-27 17:06:08 +0200
commit19e80fa19d01fb0f15d6b99c860c7a9b0de264b2 (patch)
tree519295b1ab1fde9b818b18429440ca2a9f623c08 /pkgs
parent36ffb435eef75501e7f43dc28008ab4c1f451ca5 (diff)
downloadnixlib-19e80fa19d01fb0f15d6b99c860c7a9b0de264b2.tar
nixlib-19e80fa19d01fb0f15d6b99c860c7a9b0de264b2.tar.gz
nixlib-19e80fa19d01fb0f15d6b99c860c7a9b0de264b2.tar.bz2
nixlib-19e80fa19d01fb0f15d6b99c860c7a9b0de264b2.tar.lz
nixlib-19e80fa19d01fb0f15d6b99c860c7a9b0de264b2.tar.xz
nixlib-19e80fa19d01fb0f15d6b99c860c7a9b0de264b2.tar.zst
nixlib-19e80fa19d01fb0f15d6b99c860c7a9b0de264b2.zip
pypy: fix pyexpat tests with expat-2.2.0
/cc #16477. /cc @domenKozar (don't know who better),
as I still experience test failures of different kind:
=================================== FAILURES ===================================
_______________________________________  _______________________________________
Traceback (most recent call last):
  File "/tmp/nix-build-pypy-5.1.1.drv-0/pypy-pypy-b0a649e90b66/pypy/tool/pytest/run-script/regrverbose.py", line 14, in <module>
    indirect_test()
  File "/tmp/nix-build-pypy-5.1.1.drv-0/pypy-pypy-b0a649e90b66/lib-python/2.7/test/test_ctypes.py", line 10, in test_main
    skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0)
  File "/tmp/nix-build-pypy-5.1.1.drv-0/pypy-pypy-b0a649e90b66/lib-python/2.7/ctypes/test/__init__.py", line 72, in get_tests
    mod = __import__(modname, globals(), locals(), ['*'])
  File "/tmp/nix-build-pypy-5.1.1.drv-0/pypy-pypy-b0a649e90b66/lib-python/2.7/ctypes/test/test_python_api.py", line 9, in <module>
    from _ctypes import PyObj_FromPtr
ImportError: cannot import name 'PyObj_FromPtr'

=========================== short test summary info ============================
FAIL lib-python/2.7/test/test_ctypes.py::unmodified
 9 tests deselected by '-knot ( test_ssl or test_urllib2net or test_urllibnet or test_urllib2_localnet or test_socket or test_shutil or test_zipfile64 or test_epoll )'
======= 1 failed, 341 passed, 51 skipped, 9 deselected in 550.97 seconds =======
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/interpreters/pypy/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/pypy/default.nix b/pkgs/development/interpreters/pypy/default.nix
index 708c251e4aff..f07e53e592f5 100644
--- a/pkgs/development/interpreters/pypy/default.nix
+++ b/pkgs/development/interpreters/pypy/default.nix
@@ -21,6 +21,17 @@ let
       sha256 = "1dmckvffanmh0b50pq34shnw05r55gjxn43kgvnkz5kkvvsbxdg1";
     };
 
+   # http://bugs.python.org/issue27369
+    postPatch = let
+      expatch = fetchurl {
+        name = "tests-expat-2.2.0.patch";
+        url = "http://bugs.python.org/file43514/0001-Fix-Python-2.7.11-tests-for-Expat-2.2.0.patch";
+        sha256 = "1j3pa7ly9xrhp8jjwg5l77z7i3y68gx8f8jchqk6zc39d9glq3il";
+      };
+      in ''
+      patch lib-python/2.7/test/test_pyexpat.py < '${expatch}'
+    '';
+
     buildInputs = [ bzip2 openssl pkgconfig pythonFull libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 makeWrapper gdbm db ]
       ++ stdenv.lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc
       ++ stdenv.lib.optional zlibSupport zlib;