summaryrefslogtreecommitdiff
path: root/external/python3/ExternalPackage_python3.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-02-22 16:26:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-02-23 11:12:10 +0100
commit5931638fdabb033c2f957c90ae27d075477b1261 (patch)
treecc8db0ab89b3f07d2fef3a17aeedf309ee34a3a7 /external/python3/ExternalPackage_python3.mk
parentc7a920a9b742ee273f3e7a8583d11eaeebf4fe1d (diff)
external/python3: Explicitly check that all extension modules got built
...to avoid issues like we now experienced on Jenkins box tb76, where e.g. <https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/108402/> failed with just an unhelpful > /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/external/python3/ExternalPackage_python3.mk:46: *** file /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/python3/LO_lib/_elementtree.cpython-3.8d.so does not exist in the tarball. Stop. > make[1]: *** Waiting for unfinished jobs.... > Makefile:299: recipe for target 'build' failed > make: *** [build] Error 2 after ExternalProject_python3 had been built successfully, outputting just > [build PRJ] python3 even though its workdir/UnpackedTarball/python3/build.log states > *** WARNING: renaming "_elementtree" since importing it failed: pyexpat version is incompatible and > Following modules built successfully but were removed because they could not be imported: > _elementtree (but which got hidden by gbuild) Change-Id: I28904ef41cb823e308bb8e15cbe969872702cb55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130355 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/python3/ExternalPackage_python3.mk')
-rw-r--r--external/python3/ExternalPackage_python3.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk
index faddf06fc36a..9987ab138792 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -25,7 +25,7 @@ $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYT
ifeq ($(MSVC_USE_DEBUG_RUNTIME),)
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR).dll,PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).dll))
endif
-$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+python3_EXTENSION_MODULES= \
PCbuild/$(python_arch_subdir)_asyncio$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_ctypes$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_decimal$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
@@ -40,6 +40,9 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
PCbuild/$(python_arch_subdir)select$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)unicodedata$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)winsound$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
+
+$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+ $(python3_EXTENSION_MODULES) \
))
else
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
@@ -49,14 +52,14 @@ $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin-
# Unfortunately the python build system does not allow to explicitly enable or
# disable these, it just tries to build them and then prints which did not
-# build successfully without stopping; so the build will break on delivering if
-# one of these failed to build.
+# build successfully without stopping; that's why ExternalProject_python3 explicitly checks for the
+# existence of all the files on the python3_EXTENSION_MODULES list at the end of the build.
# Obviously this list should not contain stuff with external dependencies
# that may not be available on baseline systems.
ifneq ($(OS),AIX)
python3_EXTENSION_MODULE_SUFFIX=cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d)
-$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
+python3_EXTENSION_MODULES= \
LO_lib/array.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_asyncio.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/audioop.$(python3_EXTENSION_MODULE_SUFFIX).so \
@@ -121,6 +124,9 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
LO_lib/_xxsubinterpreters.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_xxtestfuzz.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/zlib.$(python3_EXTENSION_MODULE_SUFFIX).so \
+
+$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
+ $(python3_EXTENSION_MODULES) \
))
endif
endif