external/python3/ExternalProject_python3.mk |   20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

New commits:
commit d0c3c7cb153a249ad6ab0fd544025bc24a6bb5f5
Author:     Tor Lillqvist <[email protected]>
AuthorDate: Wed Dec 2 12:21:36 2020 +0200
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Sat Dec 5 15:02:03 2020 +0100

    Drop Python modules we don't want on macOS, too, like on other platforms
    
    On macOS, for various reasons, we use a different approach than on
    other platforms to construct the bundled Python.
    
    Instead of explicitly listing what to include (out of what Python
    contains and builds) (in ExternalPackage_python3.mk), after Python is
    built, we remove stuff we don't want (in ExternalProject_python3.mk)
    and then include everything left in the LibreOfficePython.framework
    (in GeneratedPackage_python3.mk).
    
    This fixes a problem in App Store review: For some reason the review
    said that the setcchar() function from the ncurses library, used by
    Python's curses module, is non-public. No idea why the (automated)
    review picked on that function. As far as I see from the ncurses
    header in the SDK, that function is no less public than the other
    ncurses functions that the Python module uses.
    
    But oh well, we don't actually ship the curses module anyway on other
    platforms, so just drop it on macOS, too. And while at it, drop the
    other unwanted ones, too. And any binary shared libraries for them.
    
    Change-Id: Idecaf10a6fb1c59e8711095927f5699b8d2ec98e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107055
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Tor Lillqvist <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107141
    Tested-by: Tor Lillqvist <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107234
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index 91c6c1948c95..d3695e8b09ee 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -1,4 +1,4 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 
100 -*-
 #
 # This file is part of the LibreOffice project.
 #
@@ -174,9 +174,27 @@ $(call 
gb_ExternalProject_get_state_target,python3,executables) : $(call gb_Exte
                @executable_path/../LibreOfficePython $$file ; done
        touch $@
 
+# Remove modules (both Python and binary bits) of questionable usefulness that 
we don't ship on
+# other platforms either. See the "packages not shipped" comment in 
ExternalPackage_python3.mk.
+
 $(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 -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/dbm
+       rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/sqlite3
+       rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/curses
+       rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/idlelib
+       rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/tkinter
+       rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/turtledemo
        rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test
+       rm -rf 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/venv
+       # Then the binary libraries
+       rm -f 
$(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)m.so
+       rm -f 
$(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)m.so
+       rm -f 
$(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)m.so
+       rm -f 
$(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)m.so
+       rm -f 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_idlelib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
+       rm -f 
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_tkinter.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
+       rm -f 
$(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)m.so
        touch $@
 
 endif
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to