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 =======
This commit is contained in:
Vladimír Čunát 2016-06-27 17:02:19 +02:00
parent 36ffb435ee
commit 19e80fa19d

View File

@ -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;