summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/cpython
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2021-02-19 00:44:38 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2021-02-20 12:13:07 +0100
commit92087cb1701d40d2cd3e167f7fa42fab6fbcd9cc (patch)
tree2bfd13cd1f28a06622b5d7b4641535a1a4cf68cb /pkgs/development/interpreters/python/cpython
parent04f436940c85b68a5dc6b69d93a9aa542cf3bf6c (diff)
downloadnixpkgs-92087cb1701d40d2cd3e167f7fa42fab6fbcd9cc.tar
nixpkgs-92087cb1701d40d2cd3e167f7fa42fab6fbcd9cc.tar.gz
nixpkgs-92087cb1701d40d2cd3e167f7fa42fab6fbcd9cc.tar.bz2
nixpkgs-92087cb1701d40d2cd3e167f7fa42fab6fbcd9cc.tar.lz
nixpkgs-92087cb1701d40d2cd3e167f7fa42fab6fbcd9cc.tar.xz
nixpkgs-92087cb1701d40d2cd3e167f7fa42fab6fbcd9cc.tar.zst
nixpkgs-92087cb1701d40d2cd3e167f7fa42fab6fbcd9cc.zip
python37: 3.7.9 -> 3.7.10, fixup patches
Diffstat (limited to 'pkgs/development/interpreters/python/cpython')
-rw-r--r--pkgs/development/interpreters/python/cpython/3.6/find_library.patch (renamed from pkgs/development/interpreters/python/cpython/3.7/find_library.patch)0
-rw-r--r--pkgs/development/interpreters/python/cpython/3.7/no-ldconfig.patch30
-rw-r--r--pkgs/development/interpreters/python/cpython/default.nix4
3 files changed, 21 insertions, 13 deletions
diff --git a/pkgs/development/interpreters/python/cpython/3.7/find_library.patch b/pkgs/development/interpreters/python/cpython/3.6/find_library.patch
index 97fb66662d0..97fb66662d0 100644
--- a/pkgs/development/interpreters/python/cpython/3.7/find_library.patch
+++ b/pkgs/development/interpreters/python/cpython/3.6/find_library.patch
diff --git a/pkgs/development/interpreters/python/cpython/3.7/no-ldconfig.patch b/pkgs/development/interpreters/python/cpython/3.7/no-ldconfig.patch
index a1f9d68eb16..4324fc5ea61 100644
--- a/pkgs/development/interpreters/python/cpython/3.7/no-ldconfig.patch
+++ b/pkgs/development/interpreters/python/cpython/3.7/no-ldconfig.patch
@@ -1,18 +1,18 @@
-From 597e73f2a4b2f0b508127931b36d5540d6941823 Mon Sep 17 00:00:00 2001
+From ba458f33f335b217d078fdce56e9c6f9f93adb49 Mon Sep 17 00:00:00 2001
 From: Frederik Rietdijk <fridh@fridh.nl>
 Date: Mon, 28 Aug 2017 09:24:06 +0200
 Subject: [PATCH] Don't use ldconfig
 
 ---
- Lib/ctypes/util.py | 70 ++----------------------------------------------------
- 1 file changed, 2 insertions(+), 68 deletions(-)
+ Lib/ctypes/util.py | 78 ++--------------------------------------------
+ 1 file changed, 2 insertions(+), 76 deletions(-)
 
 diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
-index 5e8b31a854..7b45ce6c15 100644
+index 0c2510e..79635a8 100644
 --- a/Lib/ctypes/util.py
 +++ b/Lib/ctypes/util.py
-@@ -94,46 +94,7 @@ elif os.name == "posix":
-     import re, tempfile
+@@ -100,54 +100,7 @@ elif os.name == "posix":
+             return thefile.read(4) == elf_header
  
      def _findLib_gcc(name):
 -        # Run GCC's linker with the -t (aka --trace) option and examine the
@@ -51,15 +51,23 @@ index 5e8b31a854..7b45ce6c15 100644
 -                # Raised if the file was already removed, which is the normal
 -                # behaviour of GCC if linking fails
 -                pass
--        res = re.search(expr, trace)
+-        res = re.findall(expr, trace)
 -        if not res:
 -            return None
--        return os.fsdecode(res.group(0))
+-
+-        for file in res:
+-            # Check if the given file is an elf file: gcc can report
+-            # some files that are linker scripts and not actual
+-            # shared objects. See bpo-41976 for more details
+-            if not _is_elf(file):
+-                continue
+-            return os.fsdecode(file)
+-
 +        return None
  
- 
      if sys.platform == "sunos5":
-@@ -255,34 +216,7 @@ elif os.name == "posix":
+         # use /usr/ccs/bin/dump on solaris
+@@ -268,34 +221,7 @@ elif os.name == "posix":
      else:
  
          def _findSoname_ldconfig(name):
@@ -96,5 +104,5 @@ index 5e8b31a854..7b45ce6c15 100644
          def _findLib_ld(name):
              # See issue #9998 for why this is needed
 -- 
-2.15.0
+2.30.0
 
diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix
index 7bc6084f61d..1ae8d19ac58 100644
--- a/pkgs/development/interpreters/python/cpython/default.nix
+++ b/pkgs/development/interpreters/python/cpython/default.nix
@@ -222,9 +222,9 @@ in with passthru; stdenv.mkDerivation {
       else
         ./3.7/fix-finding-headers-when-cross-compiling.patch
     )
-  ] ++ optionals (isPy36 || isPy37) [
+  ] ++ optionals (isPy36) [
     # Backport a fix for ctypes.util.find_library.
-    ./3.7/find_library.patch
+    ./3.6/find_library.patch
   ];
 
   postPatch = ''