external/python3/ExternalProject_python3.mk | 44 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 21 deletions(-)
New commits: commit 169fcea14f7e2944fcd526123e5b106dd1bd9901 Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> AuthorDate: Fri Jan 24 13:50:45 2025 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Jan 27 11:34:38 2025 +0100 macOS: don't unintentionally ship python tkinter dylib the corresponding python module is ignored already, and the tkinter cpython dylib already was removed in the past, but apparently at some point that file wasn't generated anymore and the corresponding line to delete it was removed in 6e62c9df969fdf3a599e4f7b0e46a70e8f0780e5 The reason for removing those libraries is the same as before: They aren't actually used and on top of that they refer to private or obsolete APIs that cause the package to be rejected by review. (the other cpython module line that was removed (idelib) doesn't have a cpython library) Change-Id: I87d07ebd0b51cd5ce5530d9a563dddc45d651c5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180771 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index 21c5f9a47a70..c21cfc7973a2 100644 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -208,6 +208,7 @@ $(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : $(c rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_sqlite3.$(python3_EXTENSION_MODULE_SUFFIX).so rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_curses.$(python3_EXTENSION_MODULE_SUFFIX).so rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_curses_panel.$(python3_EXTENSION_MODULE_SUFFIX).so + rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_tkinter.$(python3_EXTENSION_MODULE_SUFFIX).so rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_test*.$(python3_EXTENSION_MODULE_SUFFIX).so touch $@ commit f9f949493507e3e54c77a872ef80117f36b985c8 Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> AuthorDate: Fri Jan 24 13:50:45 2025 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Jan 27 11:34:32 2025 +0100 macOS: simplify mac exclusion recipes on branches 25-2 and 24-8 the python tkinter dylib is back. The corresponding python module is ignored already, and the tkinter cpython dylib already was removed in the past, but apparently at some point that file wasn't generated anymore and the corresponding line to delete it was removed in 6e62c9df969fdf3a599e4f7b0e46a70e8f0780e5 That same commit also changed the filenames to use a * wildcard after the python version, apparently to account for a "d" suffix in the --enable-dbgutil case. In the spirit of the old commit to avoid rm -f and to be explicit and catch potential other issues in future remove that wildcard again/replace the suffix with a macro that contains the appropriate suffix already as used in ExternalPackage_python3.mk. Change-Id: I22b49af7dbf9a0bed5c124d9f137b8a38fee7471 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180770 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index 5bafc38e5260..21c5f9a47a70 100644 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -142,7 +142,8 @@ endif ifeq ($(OS),MACOSX) -python3_fw_prefix=$(gb_UnpackedTarball_workdir)/python3/python-inst/@__________________________________________________OOO/LibreOfficePython.framework +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) # 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 @@ -150,7 +151,7 @@ python3_fw_prefix=$(gb_UnpackedTarball_workdir)/python3/python-inst/@___________ # https://developer.apple.com/library/archive/technotes/tn2206/_index.html $(call gb_ExternalProject_get_state_target,python3,fixscripts) : $(call gb_ExternalProject_get_state_target,python3,build) $(call gb_Output_announce,python3 - remove reference to installroot from scripts,build,CUS,5) - $(COMMAND_ECHO)cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/ && \ + $(COMMAND_ECHO)cd $(python3_fw_prefix)/bin/ && \ for file in \ 2to3-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ idle$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ @@ -173,19 +174,19 @@ cd \"$$origpath\" \ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_ExternalProject_get_state_target,python3,build) \ | $(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) $(INSTALL_NAME_TOOL) -change \ - $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \ + $(python3_fw_prefix)/LibreOfficePython \ @executable_path/../../../../LibreOfficePython \ - $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/LibreOfficePython - for file in $(shell $(FIND) $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload -name "*.so") ; do \ + $(python3_fw_prefix)/Resources/Python.app/Contents/MacOS/LibreOfficePython + for file in $(shell $(FIND) $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload -name "*.so") ; do \ $(INSTALL_NAME_TOOL) -change \ - $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \ + $(python3_fw_prefix)/LibreOfficePython \ @loader_path/../../../LibreOfficePython $$file ; done touch $@ $(call gb_ExternalProject_get_state_target,python3,executables) : $(call gb_ExternalProject_get_state_target,python3,build) - cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin ; \ + cd $(python3_fw_prefix)/bin ; \ $(INSTALL_NAME_TOOL) -change \ - $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \ + $(python3_fw_prefix)/LibreOfficePython \ @executable_path/../LibreOfficePython python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) touch $@ @@ -194,20 +195,20 @@ $(call gb_ExternalProject_get_state_target,python3,executables) : $(call gb_Exte $(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : $(call gb_ExternalProject_get_state_target,python3,build) $(call gb_Output_announce,python3 - remove the stuff we don't need to ship,build,CUS,5) - rm -r $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/dbm - rm -r $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/sqlite3 - rm -r $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/curses - rm -r $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/idlelib - rm -r $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/tkinter - rm -r $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/turtledemo - rm -r $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test - rm -r $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/venv + rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/dbm + rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/sqlite3 + rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/curses + rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/idlelib + rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/tkinter + rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/turtledemo + rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test + rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/venv # Then the binary libraries - rm $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_dbm.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)*.so - rm $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_sqlite3.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)*.so - rm $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_curses.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)*.so - rm $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_curses_panel.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)*.so - rm $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_test*.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)*.so + rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_dbm.$(python3_EXTENSION_MODULE_SUFFIX).so + rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_sqlite3.$(python3_EXTENSION_MODULE_SUFFIX).so + rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_curses.$(python3_EXTENSION_MODULE_SUFFIX).so + rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_curses_panel.$(python3_EXTENSION_MODULE_SUFFIX).so + rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_test*.$(python3_EXTENSION_MODULE_SUFFIX).so touch $@ endif