pypy: 5.6 -> 5.8

this commit includes a patch, backported from master, to skip a
failing test

+33 -15
+21
pkgs/development/interpreters/python/pypy/2.7/2604-skip-urandom-fd-test.patch
··· 1 + # HG changeset patch 2 + # User Armin Rigo <arigo@tunes.org> 3 + # Date 1500108588 -7200 4 + # Node ID 20f7723ff895430c2f45647e7d0c0ca56d93e40a 5 + # Parent d135217574a6bd2e87a883e1d495f82c5e89bc8b 6 + (ronan, arigo) 7 + 8 + Issue #2604: skip this test (fails on some Linux because pypy uses the 9 + new getrandom() syscall) 10 + 11 + diff --git a/lib-python/2.7/test/test_os.py b/lib-python/2.7/test/test_os.py 12 + --- a/lib-python/2.7/test/test_os.py 13 + +++ b/lib-python/2.7/test/test_os.py 14 + @@ -580,6 +580,7 @@ 15 + "getentropy() does not use a file descriptor") 16 + class URandomFDTests(unittest.TestCase): 17 + @unittest.skipUnless(resource, "test requires the resource module") 18 + + @test_support.impl_detail(pypy=False) # on Linux, may use getrandom() 19 + def test_urandom_failure(self): 20 + # Check urandom() failing when it is not able to open /dev/random. 21 + # We spawn a new process to make the test more robust (if getrlimit()
+12 -15
pkgs/development/interpreters/python/pypy/2.7/default.nix
··· 3 3 , makeWrapper, callPackage, self, gdbm, db 4 4 , python-setup-hook 5 5 # For the Python package set 6 - , pkgs, packageOverrides ? (self: super: {}) 6 + , pkgs, pythonPackages, packageOverrides ? (self: super: {}) 7 7 }: 8 8 9 9 assert zlibSupport -> zlib != null; 10 10 11 11 let 12 - majorVersion = "5.6"; 12 + majorVersion = "5.8"; 13 13 minorVersion = "0"; 14 14 minorVersionSuffix = ""; 15 15 pythonVersion = "2.7"; ··· 23 23 24 24 src = fetchurl { 25 25 url = "https://bitbucket.org/pypy/pypy/get/release-pypy${pythonVersion}-v${version}.tar.bz2"; 26 - sha256 = "145a0kd5c0s1v2rpavw9ihncfb05s2x7chc70v8fssvyxq601911"; 26 + sha256 = "0dibf1bx4icrbi8zsqk7cfwgwsd3hfx6biz59k8j5rys3fx9z418"; 27 27 }; 28 28 29 - # http://bugs.python.org/issue27369 30 - postPatch = let 31 - expatch = fetchurl { 32 - name = "tests-expat-2.2.0.patch"; 33 - url = "http://bugs.python.org/file43514/0001-Fix-Python-2.7.11-tests-for-Expat-2.2.0.patch"; 34 - sha256 = "1j3pa7ly9xrhp8jjwg5l77z7i3y68gx8f8jchqk6zc39d9glq3il"; 35 - }; 36 - in '' 37 - patch lib-python/2.7/test/test_pyexpat.py < '${expatch}' 29 + patches = [ 30 + # https://bitbucket.org/pypy/pypy/issues/2604/lib-python-27-test-test_ospy 31 + ./2604-skip-urandom-fd-test.patch 32 + ]; 33 + 34 + postPatch = '' 38 35 substituteInPlace "lib-python/2.7/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'" 39 36 ''; 40 37 41 38 buildInputs = [ bzip2 openssl pkgconfig python libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 makeWrapper gdbm db ] 39 + ++ (with pythonPackages; [ pycparser ]) 42 40 ++ stdenv.lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc 43 41 ++ stdenv.lib.optional zlibSupport zlib; 44 42 ··· 92 90 # disable test_urllib2net, test_urllib2_localnet, and test_urllibnet because they require networking (example.com) 93 91 # disable test_ssl because no shared cipher' not found in '[Errno 1] error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure 94 92 # disable test_zipfile64 because it causes ENOSPACE 95 - # disable test_epoll because of invalid arg, should be fixed in as of version 5.1.2 96 - ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -k 'not ( test_ssl or test_urllib2net or test_urllibnet or test_urllib2_localnet or test_socket or test_shutil or test_zipfile64 or test_epoll )' lib-python 93 + ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -k 'not ( test_ssl or test_urllib2net or test_urllibnet or test_urllib2_localnet or test_socket or test_shutil or test_zipfile64 )' lib-python 97 94 ''; 98 95 99 96 installPhase = '' ··· 140 137 141 138 meta = with stdenv.lib; { 142 139 homepage = http://pypy.org/; 143 - description = "Fast, compliant alternative implementation of the Python language (2.7.8)"; 140 + description = "Fast, compliant alternative implementation of the Python language (2.7.13)"; 144 141 license = licenses.mit; 145 142 platforms = platforms.linux; 146 143 maintainers = with maintainers; [ domenkozar ];