summaryrefslogtreecommitdiff
path: root/external/python3
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-07-06 14:48:52 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-07-06 17:37:46 +0200
commitdc97b366ab9ce3d38c84da06b8b37131579f87f3 (patch)
treef73d2cd4912c5e57ad151fae19365296eaaec028 /external/python3
parent5b57fe250108a9ea30b87e40e306af8a79043354 (diff)
python3: silence distutils deprecated warning
Since a1295cb177295752f8cbfbb49e13d5bb69ed7dc7 "python: upgrade to 3.10.14 (master only)" Some builds started to fail with Traceback (most recent call last): File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/lxml/setup.py", line 15, in <module> from setuptools import setup ModuleNotFoundError: No module named 'setuptools' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/lxml/setup.py", line 17, in <module> from distutils.core import setup File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/instdir/program/python-core-3.10.14/lib/distutils/__init__.py", line 19, in <module> warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/external/lxml/ExternalProject_lxml.mk:26: /home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/ExternalProject/lxml/build] Error 1 The problem is that python 3.10 doesn't bundle setuptools so it's not possible to replace it at the moment Change-Id: I9a9d077b51f49e912dab4941efe8751c2fcc76e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170068 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
Diffstat (limited to 'external/python3')
-rw-r--r--external/python3/UnpackedTarball_python3.mk1
-rw-r--r--external/python3/distutils_deprecated.patch.017
2 files changed, 18 insertions, 0 deletions
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index 4e522715afc2..9c766c26dda4 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_UnpackedTarball_set_patchflags,python3,--binary))
endif
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
+ external/python3/distutils_deprecated.patch.0 \
external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \
external/python3/python-3.8-msvc-libffi.patch.1 \
diff --git a/external/python3/distutils_deprecated.patch.0 b/external/python3/distutils_deprecated.patch.0
new file mode 100644
index 000000000000..8affb17544d3
--- /dev/null
+++ b/external/python3/distutils_deprecated.patch.0
@@ -0,0 +1,17 @@
+--- Lib/distutils/__init__.py 2024-07-06 14:41:11.881840873 +0200
++++ Lib/distutils/__init__.py 2024-07-06 14:41:31.725586707 +0200
+@@ -7,14 +7,3 @@
+
+ setup (...)
+ """
+-
+-import sys
+-import warnings
+-
+-__version__ = sys.version[:sys.version.index(' ')]
+-
+-_DEPRECATION_MESSAGE = ("The distutils package is deprecated and slated for "
+- "removal in Python 3.12. Use setuptools or check "
+- "PEP 632 for potential alternatives")
+-warnings.warn(_DEPRECATION_MESSAGE,
+- DeprecationWarning, 2)