python: Update to 3.12.4

* drop all distutils patches, distutils is gone
* drop all setup.py patches, that's gone too
* refresh the 32bit rebase (things changed, but I added
  it to the same make target, hopefully still works)
* adjust the new module building code to depend on the import
  lib and also add the build dir to the library path so it can
  be found.
* ctypes dropped vendored things, so remove code deleting it
* the code printing a warning if a module build fails no longer
  exists, so drop the "tee" stuff and the error check there
This commit is contained in:
Christoph Reiter
2024-07-04 07:27:32 +02:00
parent b49840718d
commit cf4938d5f6
11 changed files with 52 additions and 225 deletions

View File

@@ -1,20 +1,5 @@
--- Python-3.8.7.cygwin/configure.ac 2021-05-11 21:07:52.839122100 +0200
+++ Python-3.8.7/configure.ac 2021-05-11 21:10:48.366063600 +0200
@@ -845,6 +845,14 @@
darwin
#elif defined(__VXWORKS__)
vxworks
+#elif defined(__MSYS__)
+# if defined(__x86_64__)
+ x86_64-msys
+# elif defined(__i386__)
+ i386-msys
+# else
+# error unknown platform triplet
+# endif
#elif defined(__CYGWIN__)
# if defined(__x86_64__)
x86_64-cygwin
@@ -1137,7 +1148,7 @@
case $ac_sys_system in
CYGWIN*)
@@ -35,9 +20,9 @@
else:
pythonapi = PyDLL(None)
--- Python-3.8.7.orig/Lib/ctypes/test/test_loading.py 2020-12-21 17:25:24.000000000 +0100
+++ Python-3.8.7/Lib/ctypes/test/test_loading.py 2021-05-11 22:27:51.108283400 +0200
@@ -15,7 +15,7 @@
--- Python-3.12.4/Lib/test/test_ctypes/test_loading.py.orig 2024-06-06 20:26:44.000000000 +0200
+++ Python-3.12.4/Lib/test/test_ctypes/test_loading.py 2024-07-04 07:35:25.827763700 +0200
@@ -16,7 +16,7 @@
if os.name == "nt":
libc_name = find_library("c")
elif sys.platform == "cygwin":
@@ -59,31 +44,6 @@
print(find_library("crypt"))
else:
print(cdll.LoadLibrary("libm.so"))
diff -Naur Python-3.8.2-orig/Lib/distutils/cygwinccompiler.py Python-3.8.2/Lib/distutils/cygwinccompiler.py
--- Python-3.8.2-orig/Lib/distutils/cygwinccompiler.py 2020-04-16 11:05:52.457414700 +0300
+++ Python-3.8.2/Lib/distutils/cygwinccompiler.py 2020-04-16 11:24:20.464492200 +0300
@@ -400,4 +400,4 @@
def is_cygwingcc():
'''Try to determine if the gcc that would be used is from cygwin.'''
out_string = check_output(['gcc', '-dumpmachine'])
- return out_string.strip().endswith(b'cygwin')
+ return (out_string.strip().endswith(b'cygwin') or out_string.strip().endswith(b'msys'))
diff -Naur Python-3.8.2-orig/Lib/distutils/util.py Python-3.8.2/Lib/distutils/util.py
--- Python-3.8.2-orig/Lib/distutils/util.py 2020-02-25 00:36:25.000000000 +0300
+++ Python-3.8.2/Lib/distutils/util.py 2020-04-16 11:24:20.569211200 +0300
@@ -86,6 +86,12 @@
m = rel_re.match(release)
if m:
release = m.group()
+ elif osname[:4] == "msys":
+ osname = "msys"
+ rel_re = re.compile (r'[\d.]+', re.ASCII)
+ m = rel_re.match(release)
+ if m:
+ release = m.group()
elif osname[:6] == "darwin":
import _osx_support, distutils.sysconfig
osname, release, machine = _osx_support.get_platform_osx(
diff -Naur Python-3.8.2-orig/Lib/sysconfig.py Python-3.8.2/Lib/sysconfig.py
--- Python-3.8.2-orig/Lib/sysconfig.py 2020-02-25 00:36:25.000000000 +0300
+++ Python-3.8.2/Lib/sysconfig.py 2020-04-16 11:24:20.643039800 +0300