tdf#132074: python3: bundle dbm

Change-Id: I1ed3c6e834f486cc8753513dfb03a2a0d4a8cfd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193155
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Xisco Fauli
2025-10-29 18:58:53 +01:00
parent 7a44dac223
commit 3d57e6a9b5
4 changed files with 15 additions and 4 deletions
+7 -1
View File
@@ -176,7 +176,6 @@ endif
# packages not shipped:
# dbm - need some database stuff
# curses - need curses to build the C module
# idlelib, tkinter, turtledemo - need Tk to build the C module
# test - probably unnecessary? was explicitly removed #i116738#
@@ -432,6 +431,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/ctypes/macholib/framework.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/dbm,\
Lib/dbm/__init__.py \
Lib/dbm/dumb.py \
Lib/dbm/gnu.py \
Lib/dbm/ndbm.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/email,\
Lib/email/__init__.py \
Lib/email/_encoded_words.py \
-2
View File
@@ -206,14 +206,12 @@ $(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)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/dbm
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
# Then the binary libraries
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/_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
+1 -1
View File
@@ -10,7 +10,7 @@ from os import path, walk
if __name__ == '__main__':
ignoredPackages = ["dbm", "curses", "test", "tkinter", "turtledemo", "idlelib"]
ignoredPackages = ["curses", "test", "tkinter", "turtledemo", "idlelib"]
coreDir = path.dirname(path.dirname(path.dirname(path.abspath(__file__))))
pythonDir = path.join(coreDir, "workdir/UnpackedTarball/python3")
+7
View File
@@ -47,5 +47,12 @@ class ImportsTest(unittest.TestCase):
with open(os.devnull, "w") as devnull:
print(str(venv), file=devnull)
def test_dbm_import(self):
import dbm
# use imported dbm module for pyflakes
with open(os.devnull, "w") as devnull:
print(str(dbm), file=devnull)
if __name__ == '__main__':
unittest.main()