external/python3/ExternalProject_python3.mk |   43 ++++++++++++++--------------
 1 file changed, 22 insertions(+), 21 deletions(-)

New commits:
commit 657efd649ffb183336250799a6fa4bab950d03f3
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Fri Jan 24 13:50:45 2025 +0100
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Mon Jan 27 13:37:45 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/+/180705
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

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

Reply via email to