diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2016-12-24 16:00:31 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2016-12-24 16:00:31 +0100 |
commit | 591eda8310905e78b16b4224eb677056c68889e3 (patch) | |
tree | f2c7390317a1552627ce28017c9b03b2bd8066c1 /pkgs/development/interpreters/python/cpython | |
parent | c98f3ffea867f31d1781ba7a4e3fd93a2780db0b (diff) | |
download | nixlib-591eda8310905e78b16b4224eb677056c68889e3.tar nixlib-591eda8310905e78b16b4224eb677056c68889e3.tar.gz nixlib-591eda8310905e78b16b4224eb677056c68889e3.tar.bz2 nixlib-591eda8310905e78b16b4224eb677056c68889e3.tar.lz nixlib-591eda8310905e78b16b4224eb677056c68889e3.tar.xz nixlib-591eda8310905e78b16b4224eb677056c68889e3.tar.zst nixlib-591eda8310905e78b16b4224eb677056c68889e3.zip |
python27: 2.7.12 -> 2.7.13
Diffstat (limited to 'pkgs/development/interpreters/python/cpython')
-rw-r--r-- | pkgs/development/interpreters/python/cpython/2.7/default.nix | 11 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/cpython/2.7/no-ldconfig.patch | 44 |
2 files changed, 33 insertions, 22 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 4a25382997c3..5842f6fb309a 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -28,7 +28,7 @@ with stdenv.lib; let majorVersion = "2.7"; - minorVersion = "12"; + minorVersion = "13"; minorVersionSuffix = ""; pythonVersion = majorVersion; version = "${majorVersion}.${minorVersion}${minorVersionSuffix}"; @@ -37,7 +37,7 @@ let src = fetchurl { url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz"; - sha256 = "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"; + sha256 = "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"; }; hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false); @@ -57,13 +57,6 @@ let ./properly-detect-curses.patch - # FIXME: get rid of this after the next release, when the commit referenced here makes - # it in. We need it until then because it breaks compilation of programs that use - # locale with clang 3.8 and higher. - (fetchpatch { - url = "https://hg.python.org/cpython/raw-rev/e0ec3471cb09"; - sha256 = "1jdgb70jw942r4kmr01qll7mk1di8jx0qiabmp20jhnmha246ivq"; - }) ] ++ optionals stdenv.isLinux [ # Disable the use of ldconfig in ctypes.util.find_library (since diff --git a/pkgs/development/interpreters/python/cpython/2.7/no-ldconfig.patch b/pkgs/development/interpreters/python/cpython/2.7/no-ldconfig.patch index 44c38fb29534..2a6b2a20dd19 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/no-ldconfig.patch +++ b/pkgs/development/interpreters/python/cpython/2.7/no-ldconfig.patch @@ -1,8 +1,18 @@ +From 6b0f329a9f37110020ca02b35c8125391ef282b7 Mon Sep 17 00:00:00 2001 +From: Frederik Rietdijk <fridh@fridh.nl> +Date: Sat, 24 Dec 2016 15:56:10 +0100 +Subject: [PATCH] no ldconfig + +--- + Lib/ctypes/util.py | 35 +---------------------------------- + Lib/uuid.py | 47 ----------------------------------------------- + 2 files changed, 1 insertion(+), 81 deletions(-) + diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py -index b2c514d..a6eca81 100644 +index ab10ec5..f253e34 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py -@@ -207,31 +207,7 @@ elif os.name == "posix": +@@ -235,40 +235,7 @@ elif os.name == "posix": else: def _findSoname_ldconfig(name): @@ -22,11 +32,20 @@ index b2c514d..a6eca81 100644 - - # XXX assuming GLIBC's ldconfig (with option -p) - expr = r'\s+(lib%s\.[^\s]+)\s+\(%s' % (re.escape(name), abi_type) -- f = os.popen('LC_ALL=C LANG=C /sbin/ldconfig -p 2>/dev/null') +- +- env = dict(os.environ) +- env['LC_ALL'] = 'C' +- env['LANG'] = 'C' +- null = open(os.devnull, 'wb') - try: -- data = f.read() -- finally: -- f.close() +- with null: +- p = subprocess.Popen(['/sbin/ldconfig', '-p'], +- stderr=null, +- stdout=subprocess.PIPE, +- env=env) +- except OSError: # E.g. command not found +- return None +- [data, _] = p.communicate() - res = re.search(expr, data) - if not res: - return None @@ -36,16 +55,12 @@ index b2c514d..a6eca81 100644 def find_library(name): return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name)) diff --git a/Lib/uuid.py b/Lib/uuid.py -index 7432032..9829d18 100644 +index 7432032..05eeee5 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py -@@ -437,57 +437,7 @@ def _netbios_getnode(): - return ((bytes[0]<<40L) + (bytes[1]<<32L) + (bytes[2]<<24L) + - (bytes[3]<<16L) + (bytes[4]<<8L) + bytes[5]) +@@ -441,53 +441,6 @@ def _netbios_getnode(): --# Thanks to Thomas Heller for ctypes and for his help with its use here. -- --# If ctypes is available, use it to find system routines for UUID generation. + # If ctypes is available, use it to find system routines for UUID generation. _uuid_generate_time = _UuidCreate = None -try: - import ctypes, ctypes.util @@ -97,3 +112,6 @@ index 7432032..9829d18 100644 def _unixdll_getnode(): """Get the hardware address on Unix using ctypes.""" +-- +2.11.0 + |