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

New commits:
commit 58112a22ed7208f8b975fd9568002451a5316f38
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Fri Jan 24 13:50:45 2025 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Tue Apr 29 23:09:56 2025 +0200

    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.
    
    Conflicts:
          external/python3/ExternalProject_python3.mk
    
    Change-Id: I22b49af7dbf9a0bed5c124d9f137b8a38fee7471
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180779
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins
    (cherry picked from commit f7078c42d4569b743f0aa297a01135307135fdc8)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184777
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 0f95cc36563c..806db4b91f24 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -142,7 +142,8 @@ endif
 
 ifeq ($(OS),MACOSX)
 
-python3_fw_prefix=$(call 
gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO/LibreOfficePython.framework
+python3_fw_prefix:=$(call 
gb_UnpackedTarball_get_dir,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=$(call 
gb_UnpackedTarball_get_dir,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) \
                easy_install-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
@@ -174,19 +175,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 $@
 
@@ -195,20 +196,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