python3: upgrade to 3.12.11 (master only)

* Py_DontWriteBytecodeFlag is deprecated now, replace it with
PyConfig.write_bytecode

* setuptools and pip are no longer available by default on mac.
Get them from the wheel files the same way linux and windows do

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

Change-Id: Id1043671d8fbb6b3bfa39afbf6aedd634c92c5f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181785
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli
2025-06-17 20:39:18 +02:00
parent aecf1253fd
commit 528cdd6573
12 changed files with 169 additions and 346 deletions
+7
View File
@@ -20,6 +20,7 @@ $(eval $(call gb_ExternalProject_use_externals,python3,\
$(eval $(call gb_ExternalProject_register_targets,python3,\
build \
$(if $(filter MACOSX,$(OS)),\
packages \
fixscripts \
fixinstallnames \
executables \
@@ -145,6 +146,12 @@ ifeq ($(OS),MACOSX)
python3_fw_prefix:=$(gb_UnpackedTarball_workdir)/python3/python-inst/@__________________________________________________OOO/LibreOfficePython.framework/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
python3_EXTENSION_MODULE_SUFFIX:=cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d)-darwin
# Since python 3.12 setuptools and pip are not available by default
$(call gb_ExternalProject_get_state_target,python3,packages) : $(call gb_ExternalProject_get_state_target,python3,build)
cp -r $(gb_UnpackedTarball_workdir)/python3/Lib/setuptools $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/site-packages/
cp -r $(gb_UnpackedTarball_workdir)/python3/Lib/_distutils_hack $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/site-packages/
cp -r $(gb_UnpackedTarball_workdir)/python3/Lib/pip $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/site-packages/
# rule to allow relocating the whole framework, removing reference to buildinstallation directory
# also scripts are not allowed to be signed as executables (with extended attributes), but need to
# be treated as data/put into Resources folder, see also