From 7972273fcbbaa36fac8b806eda9ac82d32915b72 Mon Sep 17 00:00:00 2001 From: Arrigo Marchiori Date: Sun, 5 Jul 2026 16:51:09 +0200 Subject: [PATCH 1/5] Download Python-3.11.15 --- main/external_deps.lst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/external_deps.lst b/main/external_deps.lst index 07a35373ca..598f097564 100644 --- a/main/external_deps.lst +++ b/main/external_deps.lst @@ -194,9 +194,9 @@ if (ENABLE_MEDIAWIKI == YES) URL2 = $(OOO_EXTRAS)$(MD5)-$(name) if (SYSTEM_PYTHON != YES) - MD5 = 38c84292658ed4456157195f1c9bcbe1 - name = Python-2.7.18.tgz - URL1 = https://www.python.org/ftp/python/2.7.18/$(name) + MD5 = 57f84cbd92d478ceff55217d88a07ded + name = Python-3.11.15.tgz + URL1 = https://www.python.org/ftp/python/3.11.15/$(name) URL2 = $(OOO_EXTRAS)$(MD5)-$(name) if (SYSTEM_BOOST != YES) From fa8c1404cc5b2462350ec296f8eaaa4b8afe72a0 Mon Sep 17 00:00:00 2001 From: Arrigo Marchiori Date: Sun, 5 Jul 2026 16:52:44 +0200 Subject: [PATCH 2/5] Ensure that the pyexpat module is built Apply the same logic as for the _md5 and _shaXXX modules. --- main/python/makefile.mk | 1 + main/python/python-pyexpat.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 main/python/python-pyexpat.patch diff --git a/main/python/makefile.mk b/main/python/makefile.mk index 042a4cf092..f757899c9d 100644 --- a/main/python/makefile.mk +++ b/main/python/makefile.mk @@ -45,6 +45,7 @@ TARFILE_NAME=Python-$(PYVERSION) TARFILE_MD5=57f84cbd92d478ceff55217d88a07ded PATCH_FILES=\ python-md5.patch \ + python-pyexpat.patch \ python-solver-before-std.patch \ python-$(PYVERSION)-sysbase.patch \ python-$(PYVERSION)-nohardlink.patch diff --git a/main/python/python-pyexpat.patch b/main/python/python-pyexpat.patch new file mode 100644 index 0000000000..756572d12d --- /dev/null +++ b/main/python/python-pyexpat.patch @@ -0,0 +1,11 @@ +--- misc/Python-3.11.15/Modules/Setup 2026-03-03 01:52:57.000000000 +0100 ++++ misc/build/Python-3.11.15/Modules/Setup 2026-07-04 12:51:02.908154677 +0200 +@@ -159,7 +159,7 @@ + + # XML + #_elementtree _elementtree.c +-#pyexpat pyexpat.c ++pyexpat pyexpat.c + + # hashing builtins + #_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c From b0bc83fb798fedfd03b1bd7f521f631833cc94be Mon Sep 17 00:00:00 2001 From: Arrigo Marchiori Date: Sun, 5 Jul 2026 16:54:29 +0200 Subject: [PATCH 3/5] Fix installation of the python module under Linux Explicitly name the possible _sysconfigdata_XXX.py files. Copy the cpython include subdirectory. --- main/python/prj/d.lst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/python/prj/d.lst b/main/python/prj/d.lst index 3a8d7d22c6..875a75943f 100644 --- a/main/python/prj/d.lst +++ b/main/python/prj/d.lst @@ -60,11 +60,15 @@ mkdir: %_DEST%\lib%_EXT%\python\python3.11\config ..\%__SRC%\misc\build\Python-3.11.15\Makefile %_DEST%\lib%_EXT%\python\python3.11\config\Makefile # TODO: _sysconfigdata filename is platform-mangled (e.g. _sysconfigdata__darwin_darwin.py on macOS, # _sysconfigdata__linux_x86_64-linux-gnu.py on Linux). Verify exact name from built tree. -..\%__SRC%\misc\build\python-inst\lib\python3.11\_sysconfigdata*.py %_DEST%\lib%_EXT%\python\_sysconfigdata.py +..\%__SRC%\misc\build\python-inst\lib\python3.11\_sysconfigdata__darwin_darwin.py %_DEST%\lib%_EXT%\python\_sysconfigdata.py +..\%__SRC%\misc\build\python-inst\lib\python3.11\_sysconfigdata__linux_x86_64-linux-gnu.py %_DEST%\lib%_EXT%\python\_sysconfigdata.py ..\pyversion.mk %_DEST%\inc%_EXT%\pyversion.mk ..\pyversion_dmake.mk %_DEST%\inc%_EXT%\pyversion_dmake.mk +mkdir: %_DEST%\inc%_EXT%\python\cpython + ..\%__SRC%\misc\build\Python-3.11.15\Include\* %_DEST%\inc%_EXT%\python\* +..\%__SRC%\misc\build\Python-3.11.15\Include\cpython\* %_DEST%\inc%_EXT%\python\cpython\* #unix ONLY ! ..\%__SRC%\misc\build\python-inst\bin\python %_DEST%\bin%_EXT%\python From bd38eee1e5dd9cf83de3da73c1ad380df0f8d23e Mon Sep 17 00:00:00 2001 From: Arrigo Marchiori Date: Sun, 5 Jul 2026 18:00:50 +0200 Subject: [PATCH 4/5] Better version check on system Python --- main/configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/configure.ac b/main/configure.ac index 50db0dbb6d..218e18187a 100644 --- a/main/configure.ac +++ b/main/configure.ac @@ -4140,9 +4140,12 @@ elif test -n "$with_system_python" -o -n "$with_system_libs" && \ python_version=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_var('VERSION'));"` # Python 3.8 and later distinguish building Python modules from linking to the libpython: # (https://bugs.python.org/issue36721) - if test "$python_version" -lt "3.8"; then + # We cannot use test(1) because Python version numbers are floats + if $PYTHON -c "import sys; v = sys.version_info; g = ((v.major < 3) or ((v.major == 3) and (v.minor < 8))); sys.exit(not g)"; then + # < 3.8 PKG_CHECK_MODULES(PYTHON, python-$python_version, PYTHON_PC="TRUE", PYTHON_PC="" ) else + # >= 3.8 PKG_CHECK_MODULES(PYTHON, python-$python_version-embed, PYTHON_PC="TRUE", PYTHON_PC="" ) fi if test "$PYTHON_PC" != "TRUE"; then From c04ff3ecd64309db7aeac9537987a9c5efc6b14b Mon Sep 17 00:00:00 2001 From: Arrigo Marchiori Date: Sun, 5 Jul 2026 18:06:13 +0200 Subject: [PATCH 5/5] Fix incorrect comment --- main/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/configure.ac b/main/configure.ac index 218e18187a..9559552ce4 100644 --- a/main/configure.ac +++ b/main/configure.ac @@ -4140,7 +4140,7 @@ elif test -n "$with_system_python" -o -n "$with_system_libs" && \ python_version=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_var('VERSION'));"` # Python 3.8 and later distinguish building Python modules from linking to the libpython: # (https://bugs.python.org/issue36721) - # We cannot use test(1) because Python version numbers are floats + # We cannot use test(1) because Python version numbers are in the "major.minor.micro" form if $PYTHON -c "import sys; v = sys.version_info; g = ((v.major < 3) or ((v.major == 3) and (v.minor < 8))); sys.exit(not g)"; then # < 3.8 PKG_CHECK_MODULES(PYTHON, python-$python_version, PYTHON_PC="TRUE", PYTHON_PC="" )