Python: upgrade to 3.11.11 (master only)

Downloaded from https://www.python.org/ftp/python/3.11.11/Python-3.11.11.tar.xz

* Add external/python3/replace-powershell-with-wget.patch.1
to avoid

FindPythonForBuild:
 Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure
 channel.
 At line:1 char:1
 + Invoke-WebRequest https://aka.ms/nugetclidl -OutFile
 'C:\cygwin64\home\tdf\jenki ...
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~
     + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:Htt
    pWebRequest) [Invoke-WebRequest], WebException
     + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
    ll.Commands.InvokeWebRequestCommand

 'py' is not recognized as an internal or external command,
 operable program or batch file.

when downloading nuget.exe from https://aka.ms/nugetclidl
using powershell. By default powershell uses TLS 1.0 and the site security requires TLS 1.2,
so it fails with 'The request was aborted: Could not create SSL/TLS
secure channel.'

Kudos to Caolán for helping with a compiling issue.
See https://lists.freedesktop.org/archives/libreoffice/2024-December/092830.html

Change-Id: If66a88dd8f8c7774c49f8c33e9e40d2d5418e7c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178681
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli
2025-01-09 15:42:20 +01:00
parent b06e7814d2
commit 50524481b3
13 changed files with 83 additions and 395 deletions
+7 -2
View File
@@ -10437,8 +10437,8 @@ fi
if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_python" = internal; then
SYSTEM_PYTHON=
PYTHON_VERSION_MAJOR=3
PYTHON_VERSION_MINOR=10
PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.16
PYTHON_VERSION_MINOR=11
PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.11
if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst])
fi
@@ -14188,6 +14188,11 @@ if test "$ENABLE_ONLINE_UPDATE_MAR" = TRUE -o "$enable_python" = internal; then
else
AC_MSG_RESULT([no])
BUILD_TYPE="$BUILD_TYPE BZIP2"
if test "$COM" = "MSC"; then
BZIP2_LIBS="${WORKDIR}/UnpackedTarball/bzip2/libbz2.lib"
else
BZIP2_LIBS="-L${WORKDIR}/UnpackedTarball/bzip2 -lbz2"
fi
fi
fi
AC_SUBST(SYSTEM_BZIP2)
+2 -2
View File
@@ -590,8 +590,8 @@ POSTGRESQL_TARBALL := postgresql-14.15.tar.bz2
# three static lines
# so that git cherry-pick
# will not run into conflicts
PYTHON_SHA256SUM := bfb249609990220491a1b92850a07135ed0831e41738cf681d63cf01b2a8fbd1
PYTHON_TARBALL := Python-3.10.16.tar.xz
PYTHON_SHA256SUM := 2a9920c7a0cd236de33644ed980a13cbbc21058bfdc528febb6081575ed73be3
PYTHON_TARBALL := Python-3.11.11.tar.xz
# three static lines
# so that git cherry-pick
# will not run into conflicts
@@ -1,299 +0,0 @@
From 38f331d4656394ae0f425568e26790ace778e076 Mon Sep 17 00:00:00 2001
From: Christian Heimes <christian@python.org>
Date: Thu, 24 Feb 2022 21:51:57 +0200
Subject: [PATCH] bpo-45898: Remove duplicate symbols from _ctypes/cfield.c
(GH-29791)
---
.../2021-11-26-10-46-09.bpo-45898.UIfhsb.rst | 2 +
Modules/_ctypes/cfield.c | 227 ++++++++----------
PCbuild/_ctypes.vcxproj | 2 +-
3 files changed, 106 insertions(+), 125 deletions(-)
create mode 100644 Misc/NEWS.d/next/Library/2021-11-26-10-46-09.bpo-45898.UIfhsb.rst
diff --git a/Misc/NEWS.d/next/Library/2021-11-26-10-46-09.bpo-45898.UIfhsb.rst b/Misc/NEWS.d/next/Library/2021-11-26-10-46-09.bpo-45898.UIfhsb.rst
new file mode 100644
index 0000000000..9da5c258ab
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2021-11-26-10-46-09.bpo-45898.UIfhsb.rst
@@ -0,0 +1,2 @@
+:mod:`ctypes` no longer defines ``ffi_type_*`` symbols in ``cfield.c``. The
+symbols have been provided by libffi for over a decade.
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index 515b280182..2992d34934 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -1481,55 +1481,40 @@ P_get(void *ptr, Py_ssize_t size)
}
static struct fielddesc formattable[] = {
- { 's', s_set, s_get, &ffi_type_pointer},
- { 'b', b_set, b_get, &ffi_type_schar},
- { 'B', B_set, B_get, &ffi_type_uchar},
- { 'c', c_set, c_get, &ffi_type_schar},
- { 'd', d_set, d_get, &ffi_type_double, d_set_sw, d_get_sw},
- { 'g', g_set, g_get, &ffi_type_longdouble},
- { 'f', f_set, f_get, &ffi_type_float, f_set_sw, f_get_sw},
- { 'h', h_set, h_get, &ffi_type_sshort, h_set_sw, h_get_sw},
- { 'H', H_set, H_get, &ffi_type_ushort, H_set_sw, H_get_sw},
- { 'i', i_set, i_get, &ffi_type_sint, i_set_sw, i_get_sw},
- { 'I', I_set, I_get, &ffi_type_uint, I_set_sw, I_get_sw},
-/* XXX Hm, sizeof(int) == sizeof(long) doesn't hold on every platform */
-/* As soon as we can get rid of the type codes, this is no longer a problem */
-#if SIZEOF_LONG == 4
- { 'l', l_set, l_get, &ffi_type_sint32, l_set_sw, l_get_sw},
- { 'L', L_set, L_get, &ffi_type_uint32, L_set_sw, L_get_sw},
-#elif SIZEOF_LONG == 8
- { 'l', l_set, l_get, &ffi_type_sint64, l_set_sw, l_get_sw},
- { 'L', L_set, L_get, &ffi_type_uint64, L_set_sw, L_get_sw},
-#else
-# error
-#endif
-#if SIZEOF_LONG_LONG == 8
- { 'q', q_set, q_get, &ffi_type_sint64, q_set_sw, q_get_sw},
- { 'Q', Q_set, Q_get, &ffi_type_uint64, Q_set_sw, Q_get_sw},
-#else
-# error
-#endif
- { 'P', P_set, P_get, &ffi_type_pointer},
- { 'z', z_set, z_get, &ffi_type_pointer},
- { 'u', u_set, u_get, NULL}, /* ffi_type set later */
- { 'U', U_set, U_get, &ffi_type_pointer},
- { 'Z', Z_set, Z_get, &ffi_type_pointer},
+ { 's', s_set, s_get, NULL},
+ { 'b', b_set, b_get, NULL},
+ { 'B', B_set, B_get, NULL},
+ { 'c', c_set, c_get, NULL},
+ { 'd', d_set, d_get, NULL, d_set_sw, d_get_sw},
+ { 'g', g_set, g_get, NULL},
+ { 'f', f_set, f_get, NULL, f_set_sw, f_get_sw},
+ { 'h', h_set, h_get, NULL, h_set_sw, h_get_sw},
+ { 'H', H_set, H_get, NULL, H_set_sw, H_get_sw},
+ { 'i', i_set, i_get, NULL, i_set_sw, i_get_sw},
+ { 'I', I_set, I_get, NULL, I_set_sw, I_get_sw},
+ { 'l', l_set, l_get, NULL, l_set_sw, l_get_sw},
+ { 'L', L_set, L_get, NULL, L_set_sw, L_get_sw},
+ { 'q', q_set, q_get, NULL, q_set_sw, q_get_sw},
+ { 'Q', Q_set, Q_get, NULL, Q_set_sw, Q_get_sw},
+ { 'P', P_set, P_get, NULL},
+ { 'z', z_set, z_get, NULL},
+ { 'u', u_set, u_get, NULL},
+ { 'U', U_set, U_get, NULL},
+ { 'Z', Z_set, Z_get, NULL},
#ifdef MS_WIN32
- { 'X', BSTR_set, BSTR_get, &ffi_type_pointer},
+ { 'X', BSTR_set, BSTR_get, NULL},
#endif
- { 'v', vBOOL_set, vBOOL_get, &ffi_type_sshort},
-#if SIZEOF__BOOL == 1
- { '?', bool_set, bool_get, &ffi_type_uchar}, /* Also fallback for no native _Bool support */
-#elif SIZEOF__BOOL == SIZEOF_SHORT
- { '?', bool_set, bool_get, &ffi_type_ushort},
-#elif SIZEOF__BOOL == SIZEOF_INT
- { '?', bool_set, bool_get, &ffi_type_uint, I_set_sw, I_get_sw},
+ { 'v', vBOOL_set, vBOOL_get, NULL},
+#if SIZEOF__BOOL == SIZEOF_INT
+ { '?', bool_set, bool_get, NULL, I_set_sw, I_get_sw},
#elif SIZEOF__BOOL == SIZEOF_LONG
- { '?', bool_set, bool_get, &ffi_type_ulong, L_set_sw, L_get_sw},
+ { '?', bool_set, bool_get, NULL, L_set_sw, L_get_sw},
#elif SIZEOF__BOOL == SIZEOF_LONG_LONG
- { '?', bool_set, bool_get, &ffi_type_ulong, Q_set_sw, Q_get_sw},
+ { '?', bool_set, bool_get, NULL, Q_set_sw, Q_get_sw},
+#else
+ { '?', bool_set, bool_get, NULL},
#endif /* SIZEOF__BOOL */
- { 'O', O_set, O_get, &ffi_type_pointer},
+ { 'O', O_set, O_get, NULL},
{ 0, NULL, NULL, NULL},
};
@@ -1538,6 +1523,79 @@ static struct fielddesc formattable[] = {
Use '?' as code for BOOL.
*/
+/* Delayed initialization. Windows cannot statically reference dynamically
+ loaded addresses from DLLs. */
+void
+_ctypes_init_fielddesc(void)
+{
+ struct fielddesc *fd = formattable;
+ for (; fd->code; ++fd) {
+ switch (fd->code) {
+ case 's': fd->pffi_type = &ffi_type_pointer; break;
+ case 'b': fd->pffi_type = &ffi_type_schar; break;
+ case 'B': fd->pffi_type = &ffi_type_uchar; break;
+ case 'c': fd->pffi_type = &ffi_type_schar; break;
+ case 'd': fd->pffi_type = &ffi_type_double; break;
+ case 'g': fd->pffi_type = &ffi_type_longdouble; break;
+ case 'f': fd->pffi_type = &ffi_type_float; break;
+ case 'h': fd->pffi_type = &ffi_type_sshort; break;
+ case 'H': fd->pffi_type = &ffi_type_ushort; break;
+ case 'i': fd->pffi_type = &ffi_type_sint; break;
+ case 'I': fd->pffi_type = &ffi_type_uint; break;
+ /* XXX Hm, sizeof(int) == sizeof(long) doesn't hold on every platform */
+ /* As soon as we can get rid of the type codes, this is no longer a problem */
+ #if SIZEOF_LONG == 4
+ case 'l': fd->pffi_type = &ffi_type_sint32; break;
+ case 'L': fd->pffi_type = &ffi_type_uint32; break;
+ #elif SIZEOF_LONG == 8
+ case 'l': fd->pffi_type = &ffi_type_sint64; break;
+ case 'L': fd->pffi_type = &ffi_type_uint64; break;
+ #else
+ #error
+ #endif
+ #if SIZEOF_LONG_LONG == 8
+ case 'q': fd->pffi_type = &ffi_type_sint64; break;
+ case 'Q': fd->pffi_type = &ffi_type_uint64; break;
+ #else
+ #error
+ #endif
+ case 'P': fd->pffi_type = &ffi_type_pointer; break;
+ case 'z': fd->pffi_type = &ffi_type_pointer; break;
+ case 'u':
+ if (sizeof(wchar_t) == sizeof(short))
+ fd->pffi_type = &ffi_type_sshort;
+ else if (sizeof(wchar_t) == sizeof(int))
+ fd->pffi_type = &ffi_type_sint;
+ else if (sizeof(wchar_t) == sizeof(long))
+ fd->pffi_type = &ffi_type_slong;
+ else
+ Py_UNREACHABLE();
+ break;
+ case 'U': fd->pffi_type = &ffi_type_pointer; break;
+ case 'Z': fd->pffi_type = &ffi_type_pointer; break;
+ #ifdef MS_WIN32
+ case 'X': fd->pffi_type = &ffi_type_pointer; break;
+ #endif
+ case 'v': fd->pffi_type = &ffi_type_sshort; break;
+ #if SIZEOF__BOOL == 1
+ case '?': fd->pffi_type = &ffi_type_uchar; break; /* Also fallback for no native _Bool support */
+ #elif SIZEOF__BOOL == SIZEOF_SHORT
+ case '?': fd->pffi_type = &ffi_type_ushort; break;
+ #elif SIZEOF__BOOL == SIZEOF_INT
+ case '?': fd->pffi_type = &ffi_type_uint; break;
+ #elif SIZEOF__BOOL == SIZEOF_LONG
+ case '?': fd->pffi_type = &ffi_type_ulong; break;
+ #elif SIZEOF__BOOL == SIZEOF_LONG_LONG
+ case '?': fd->pffi_type = &ffi_type_ulong; break;
+ #endif /* SIZEOF__BOOL */
+ case 'O': fd->pffi_type = &ffi_type_pointer; break;
+ default:
+ Py_UNREACHABLE();
+ }
+ }
+
+}
+
struct fielddesc *
_ctypes_get_fielddesc(const char *fmt)
{
@@ -1545,13 +1603,7 @@ _ctypes_get_fielddesc(const char *fmt)
struct fielddesc *table = formattable;
if (!initialized) {
- initialized = 1;
- if (sizeof(wchar_t) == sizeof(short))
- _ctypes_get_fielddesc("u")->pffi_type = &ffi_type_sshort;
- else if (sizeof(wchar_t) == sizeof(int))
- _ctypes_get_fielddesc("u")->pffi_type = &ffi_type_sint;
- else if (sizeof(wchar_t) == sizeof(long))
- _ctypes_get_fielddesc("u")->pffi_type = &ffi_type_slong;
+ _ctypes_init_fielddesc();
}
for (; table->code; ++table) {
@@ -1561,77 +1613,4 @@ _ctypes_get_fielddesc(const char *fmt)
return NULL;
}
-typedef struct { char c; char x; } s_char;
-typedef struct { char c; short x; } s_short;
-typedef struct { char c; int x; } s_int;
-typedef struct { char c; long x; } s_long;
-typedef struct { char c; float x; } s_float;
-typedef struct { char c; double x; } s_double;
-typedef struct { char c; long double x; } s_long_double;
-typedef struct { char c; char *x; } s_char_p;
-typedef struct { char c; void *x; } s_void_p;
-
-/*
-#define CHAR_ALIGN (sizeof(s_char) - sizeof(char))
-#define SHORT_ALIGN (sizeof(s_short) - sizeof(short))
-#define LONG_ALIGN (sizeof(s_long) - sizeof(long))
-*/
-#define INT_ALIGN (sizeof(s_int) - sizeof(int))
-#define FLOAT_ALIGN (sizeof(s_float) - sizeof(float))
-#define DOUBLE_ALIGN (sizeof(s_double) - sizeof(double))
-#define LONGDOUBLE_ALIGN (sizeof(s_long_double) - sizeof(long double))
-
-/* #define CHAR_P_ALIGN (sizeof(s_char_p) - sizeof(char*)) */
-#define VOID_P_ALIGN (sizeof(s_void_p) - sizeof(void*))
-
-/*
-#ifdef HAVE_USABLE_WCHAR_T
-typedef struct { char c; wchar_t x; } s_wchar;
-typedef struct { char c; wchar_t *x; } s_wchar_p;
-
-#define WCHAR_ALIGN (sizeof(s_wchar) - sizeof(wchar_t))
-#define WCHAR_P_ALIGN (sizeof(s_wchar_p) - sizeof(wchar_t*))
-#endif
-*/
-
-typedef struct { char c; long long x; } s_long_long;
-#define LONG_LONG_ALIGN (sizeof(s_long_long) - sizeof(long long))
-
-/* from ffi.h:
-typedef struct _ffi_type
-{
- size_t size;
- unsigned short alignment;
- unsigned short type;
- struct _ffi_type **elements;
-} ffi_type;
-*/
-
-/* align and size are bogus for void, but they must not be zero */
-ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID };
-
-ffi_type ffi_type_uint8 = { 1, 1, FFI_TYPE_UINT8 };
-ffi_type ffi_type_sint8 = { 1, 1, FFI_TYPE_SINT8 };
-
-ffi_type ffi_type_uint16 = { 2, 2, FFI_TYPE_UINT16 };
-ffi_type ffi_type_sint16 = { 2, 2, FFI_TYPE_SINT16 };
-
-ffi_type ffi_type_uint32 = { 4, INT_ALIGN, FFI_TYPE_UINT32 };
-ffi_type ffi_type_sint32 = { 4, INT_ALIGN, FFI_TYPE_SINT32 };
-
-ffi_type ffi_type_uint64 = { 8, LONG_LONG_ALIGN, FFI_TYPE_UINT64 };
-ffi_type ffi_type_sint64 = { 8, LONG_LONG_ALIGN, FFI_TYPE_SINT64 };
-
-ffi_type ffi_type_float = { sizeof(float), FLOAT_ALIGN, FFI_TYPE_FLOAT };
-ffi_type ffi_type_double = { sizeof(double), DOUBLE_ALIGN, FFI_TYPE_DOUBLE };
-
-#ifdef ffi_type_longdouble
-#undef ffi_type_longdouble
-#endif
- /* This is already defined on OSX */
-ffi_type ffi_type_longdouble = { sizeof(long double), LONGDOUBLE_ALIGN,
- FFI_TYPE_LONGDOUBLE };
-
-ffi_type ffi_type_pointer = { sizeof(void *), VOID_P_ALIGN, FFI_TYPE_POINTER };
-
/*---------------- EOF ----------------*/
diff --git a/PCbuild/_ctypes.vcxproj b/PCbuild/_ctypes.vcxproj
index 69e4271a9b..6ac26f1916 100644
--- a/PCbuild/_ctypes.vcxproj
+++ b/PCbuild/_ctypes.vcxproj
@@ -94,7 +94,7 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
- <PreprocessorDefinitions>FFI_BUILDING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>USING_MALLOC_CLOSURE_DOT_C=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
--
2.43.0
+42 -9
View File
@@ -186,7 +186,7 @@ endif
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
Lib/__future__.py \
Lib/__phello__.foo.py \
Lib/__hello__.py \
Lib/_aix_support.py \
Lib/_bootsubprocess.py \
Lib/_collections_abc.py \
@@ -210,7 +210,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/asyncore.py \
Lib/base64.py \
Lib/bdb.py \
Lib/binhex.py \
Lib/bisect.py \
Lib/bz2.py \
Lib/cProfile.py \
@@ -297,7 +296,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/queue.py \
Lib/quopri.py \
Lib/random.py \
Lib/re.py \
Lib/reprlib.py \
Lib/rlcompleter.py \
Lib/runpy.py \
@@ -356,6 +354,16 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/zipimport.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/__phello__,\
Lib/__phello__/__init__.py \
Lib/__phello__/spam.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/__phello__/ham,\
Lib/__phello__/ham/__init__.py \
Lib/__phello__/ham/eggs.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/asyncio,\
Lib/asyncio/__init__.py \
Lib/asyncio/__main__.py \
@@ -381,8 +389,10 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/asyncio/staggered.py \
Lib/asyncio/streams.py \
Lib/asyncio/subprocess.py \
Lib/asyncio/taskgroups.py \
Lib/asyncio/tasks.py \
Lib/asyncio/threads.py \
Lib/asyncio/timeouts.py \
Lib/asyncio/transports.py \
Lib/asyncio/trsock.py \
Lib/asyncio/unix_events.py \
@@ -460,7 +470,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/distutils/command/__init__.py \
Lib/distutils/command/bdist.py \
Lib/distutils/command/bdist_dumb.py \
Lib/distutils/command/bdist_msi.py \
Lib/distutils/command/bdist_rpm.py \
Lib/distutils/command/build.py \
Lib/distutils/command/build_clib.py \
@@ -650,8 +659,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/ensurepip/_bundled,\
Lib/ensurepip/_bundled/__init__.py \
Lib/ensurepip/_bundled/pip-23.0.1-py3-none-any.whl \
Lib/ensurepip/_bundled/pip-24.0-py3-none-any.whl \
Lib/ensurepip/_bundled/setuptools-65.5.0-py3-none-any.whl \
))
@@ -672,14 +680,12 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/importlib,\
Lib/importlib/__init__.py \
Lib/importlib/_abc.py \
Lib/importlib/_adapters.py \
Lib/importlib/_bootstrap.py \
Lib/importlib/_bootstrap_external.py \
Lib/importlib/_common.py \
Lib/importlib/abc.py \
Lib/importlib/machinery.py \
Lib/importlib/readers.py \
Lib/importlib/resources.py \
Lib/importlib/simple.py \
Lib/importlib/util.py \
))
@@ -693,6 +699,17 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/importlib/metadata/_text.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/importlib/resources,\
Lib/importlib/resources/__init__.py \
Lib/importlib/resources/_adapters.py \
Lib/importlib/resources/_common.py \
Lib/importlib/resources/_itertools.py \
Lib/importlib/resources/_legacy.py \
Lib/importlib/resources/abc.py \
Lib/importlib/resources/readers.py \
Lib/importlib/resources/simple.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/json,\
Lib/json/__init__.py \
Lib/json/decoder.py \
@@ -835,10 +852,25 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/pydoc_data/topics.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/re,\
Lib/re/__init__.py \
Lib/re/_casefix.py \
Lib/re/_compiler.py \
Lib/re/_constants.py \
Lib/re/_parser.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/site-packages,\
Lib/site-packages/README.txt \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/tomllib,\
Lib/tomllib/__init__.py \
Lib/tomllib/_parser.py \
Lib/tomllib/_re.py \
Lib/tomllib/_types.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest,\
Lib/unittest/__init__.py \
Lib/unittest/__main__.py \
@@ -869,6 +901,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/wsgiref/handlers.py \
Lib/wsgiref/headers.py \
Lib/wsgiref/simple_server.py \
Lib/wsgiref/types.py \
Lib/wsgiref/util.py \
Lib/wsgiref/validate.py \
))
+6
View File
@@ -33,9 +33,15 @@ ifeq ($(OS),WNT)
# at least for MSVC 2008 it is necessary to clear MAKEFLAGS because
# nmake is invoked
#
# Since Python 3.11, _freeze_module.vcxproj needs python.exe to build
# deepfreeze.c. At the moment target _RebuildDeepFrozen is called, python.exe
# doesn't exist yet so it needs to be downloaded using nuget.
# Call find_python.bat first to have nuget.exe and python.exe ready before building
$(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_Trace_StartRange,python3,EXTERNAL)
$(call gb_ExternalProject_run,build,\
cmd /c $(gb_UnpackedTarball_workdir)/python3/PCbuild/find_python.bat -q && \
MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build $(gb_MSBUILD_CONFIG_AND_PLATFORM) \
/p:bz2Dir=$(gb_UnpackedTarball_workdir)/bzip2 \
/p:opensslIncludeDir=$(gb_UnpackedTarball_workdir)/openssl/include \
+1 -4
View File
@@ -21,14 +21,11 @@ ifneq ($(MSYSTEM),)
$(eval $(call gb_UnpackedTarball_set_patchflags,python3,--binary))
endif
# external/python3/0001-bpo-45898-Remove-duplicate-symbols-from-_ctypes-cfie.patch.1:
# backport from https://github.com/python/cpython/commit/38f331d4656394ae0f425568e26790ace778e076
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/0001-bpo-45898-Remove-duplicate-symbols-from-_ctypes-cfie.patch.1 \
external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \
external/python3/python-3.8-msvc-libffi.patch.1 \
external/python3/python-3.7.6-msvc-ssl.patch.1 \
external/python3/replace-powershell-with-wget.patch.1 \
external/python3/python-3.5.4-msvc-disable.patch.1 \
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
+4 -40
View File
@@ -1,9 +1,9 @@
--- configure
+++ configure
@@ -12333,13 +12333,13 @@
;;
esac
@@ -16356,13 +16356,13 @@
ZLIB_CFLAGS=${ZLIB_CFLAGS-""}
ZLIB_LIBS=${ZLIB_LIBS-"-lz"}
py_check_lib_save_LIBS=$LIBS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
-$as_echo_n "checking for inflateCopy in -lz... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lzlib" >&5
@@ -17,39 +17,3 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
--- setup.py
+++ setup.py
@@ -1483,7 +1483,7 @@
#
# You can upgrade zlib to version 1.1.4 yourself by going to
# http://www.gzip.org/zlib/
- zlib_inc = find_file('zlib.h', [], self.inc_dirs)
+ zlib_inc = [os.environ.get('ZLIB_INCDIR')]
have_zlib = False
if zlib_inc is not None:
zlib_h = zlib_inc[0] + '/zlib.h'
@@ -1500,13 +1500,13 @@
version = line.split()[2]
break
if version >= version_req:
- if (self.compiler.find_library_file(self.lib_dirs, 'z')):
+ if (self.compiler.find_library_file(self.lib_dirs, 'zlib')):
if MACOS:
zlib_extra_link_args = ('-Wl,-search_paths_first',)
else:
zlib_extra_link_args = ()
self.add(Extension('zlib', ['zlibmodule.c'],
- libraries=['z'],
+ libraries=['zlib'],
extra_link_args=zlib_extra_link_args))
have_zlib = True
else:
@@ -1520,7 +1520,7 @@
# crc32 if we have it. Otherwise binascii uses its own.
if have_zlib:
extra_compile_args = ['-DUSE_ZLIB_CRC32']
- libraries = ['z']
+ libraries = ['zlib']
extra_link_args = zlib_extra_link_args
else:
extra_compile_args = []
+5 -5
View File
@@ -5,14 +5,14 @@ set RPATH (only to be used on ELF platforms)
diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
--- python3.orig/Makefile.pre.in 2015-07-26 20:29:07.126194320 +0200
+++ python3/Makefile.pre.in 2015-07-26 20:37:21.814227530 +0200
@@ -586,7 +586,7 @@
@@ -706,7 +706,7 @@
# Build the interpreter
$(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS)
- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -Wl,-rpath,\$$ORIGIN
$(BUILDPYTHON): Programs/python.o $(LINK_PYTHON_DEPS)
- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) -Wl,-rpath,\$$ORIGIN
platform: $(BUILDPYTHON) pybuilddir.txt
platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
@@ -628,7 +628,7 @@
fi
+3 -3
View File
@@ -3,9 +3,9 @@ Disable some stuff LO does not need, especially stuff with external dependencies
diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
--- python3.orig/PCbuild/pcbuild.sln 2023-08-25 04:36:32.000000000 +0900
+++ python3/PCbuild/pcbuild.sln 2023-09-20 17:43:05.442089400 +0900
@@ -15,8 +15,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
@@ -18,8 +18,6 @@
{19C0C13F-47CA-4432-AFF3-799A296A4DDC} = {19C0C13F-47CA-4432-AFF3-799A296A4DDC}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcxproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
-EndProject
-13
View File
@@ -12,16 +12,3 @@ No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc" />
--- python3/PCbuild/openssl.props.orig 2019-12-23 16:20:34.588135900 +0100
+++ python3/PCbuild/openssl.props 2019-12-23 16:20:51.074001300 +0100
@@ -10,9 +10,7 @@
</Link>
</ItemDefinitionGroup>
<PropertyGroup>
- <_DLLSuffix>-1_1</_DLLSuffix>
- <_DLLSuffix Condition="$(Platform) == 'ARM'">$(_DLLSuffix)-arm</_DLLSuffix>
- <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix>
+ <_DLLSuffix>-3</_DLLSuffix>
</PropertyGroup>
<ItemGroup>
<_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
-16
View File
@@ -1,16 +0,0 @@
--- python3/PCbuild/libffi.props.orig 2023-08-25 04:36:32.000000000 +0900
+++ python3/PCbuild/libffi.props 2023-10-14 15:13:24.850511531 +0900
@@ -6,11 +6,11 @@
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(libffiOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libffi-7.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libffi-8.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
- <_LIBFFIDLL Include="$(libffiOutDir)\libffi-7.dll" />
+ <_LIBFFIDLL Include="$(libffiOutDir)\libffi-8.dll" />
</ItemGroup>
<Target Name="_CopyLIBFFIDLL" Inputs="@(_LIBFFIDLL)" Outputs="@(_LIBFFIDLL->'$(OutDir)%(Filename)%(Extension)')" AfterTargets="Build">
<Copy SourceFiles="@(_LIBFFIDLL)" DestinationFolder="$(OutDir)" />
+11
View File
@@ -0,0 +1,11 @@
--- python3/PCbuild/find_python.bat 2025-01-03 11:53:41.867445033 +0100
+++ python3/PCbuild/find_python.bat 2025-01-03 11:54:25.018865518 +0100
@@ -56,7 +56,7 @@
@rem NB: Must use single quotes around NUGET here, NOT double!
@rem Otherwise, a space in the path would break things
@rem If it fails, retry with any available copy of Python
- @powershell.exe -Command Invoke-WebRequest %_Py_NUGET_URL% -OutFile '%_Py_NUGET%'
+ @wget -O '%_Py_NUGET%' %_Py_NUGET_URL%
@if errorlevel 1 (
@%_Py_HOST_PYTHON% -E "%_Py_D%\urlretrieve.py" "%_Py_NUGET_URL%" "%_Py_NUGET%"
)
+2 -2
View File
@@ -1,7 +1,7 @@
--- Python/ceval_gil.h
+++ Python/ceval_gil.h
@@ -135,6 +135,7 @@
@@ -136,6 +136,7 @@
#ifdef HAVE_FORK
static void recreate_gil(struct _gil_runtime_state *gil)
{
+ _Py_ANNOTATE_RWLOCK_RELEASED(&gil->locked, 1);