external/lxml/UnpackedTarball_lxml.mk | 2 - external/lxml/replace-setuptools-with-distutils.patch.0 | 11 ------ external/lxml/replace-setuptools-with-distutils.patch.1 | 29 ++++++++++++++++ 3 files changed, 30 insertions(+), 12 deletions(-)
New commits: commit c920605dd4c4520ab8ee80f9fb4746287835918c Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Oct 20 10:37:35 2023 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Oct 20 13:19:57 2023 +0200 external/lxml: Fix --enable-python=fully-internal build After commit a4b4a90557f9fc1839fc0eb297f4c6a4e94c761a Date: Sun Jul 2 14:54:23 2023 +0900 lxml: upgrade to release 4.9.2 , my `--enable-python=fully-internal` build started to fail with Building lxml version 4.9.2. Building without Cython. Building against libxml2 2.9.14 and libxslt 1.1.35 Traceback (most recent call last): File "setup.py", line 207, in <module> setup( File ".../libreoffice/instdir/program/python-core-3.8.18/lib/distutils/core.py", line 108, in setup _setup_distribution = dist = klass(attrs) File ".../libreoffice/instdir/program/python-core-3.8.18/lib/distutils/dist.py", line 274, in __init__ warnings.warn(msg) UserWarning: Unknown distribution option: 'project_urls' make[1]: *** [.../libreoffice/external/lxml/ExternalProject_lxml.mk:26: .../libreoffice/workdir/ExternalProject/lxml/build] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:289: build] Error 2 and Julien reports the same in [1]. The above commit includes a patch to switch from setuptools to distutils. Possibly the distutils variant of the `setup` function doesn't know about the "project_urls" keyword argument (at least in our bundled Python version), so extend the patch to drop that from the `setup.py`. [1] https://gerrit.libreoffice.org/c/core/+/153863 Change-Id: Icfac9fb0a3c62d3b30c12bc23ddbc0f9b088d788 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158230 Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/external/lxml/UnpackedTarball_lxml.mk b/external/lxml/UnpackedTarball_lxml.mk index 8d032e70dd90..1b19b6fd1680 100644 --- a/external/lxml/UnpackedTarball_lxml.mk +++ b/external/lxml/UnpackedTarball_lxml.mk @@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,lxml,$(LXML_TARBALL))) $(eval $(call gb_UnpackedTarball_add_patches,lxml, \ external/lxml/0001-Make-regexp-string-raw-to-correct-its-escape-sequenc.patch.1 \ - external/lxml/replace-setuptools-with-distutils.patch.0 \ + external/lxml/replace-setuptools-with-distutils.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/lxml/replace-setuptools-with-distutils.patch.0 b/external/lxml/replace-setuptools-with-distutils.patch.0 deleted file mode 100644 index 92494befa0f7..000000000000 --- a/external/lxml/replace-setuptools-with-distutils.patch.0 +++ /dev/null @@ -1,11 +0,0 @@ ---- setupinfo.py -+++ setupinfo.py -@@ -4,7 +4,7 @@ - import os.path - import subprocess - --from setuptools.command.build_ext import build_ext as _build_ext -+from distutils.command.build_ext import build_ext as _build_ext - from distutils.core import Extension - from distutils.errors import CompileError, DistutilsOptionError - from versioninfo import get_base_dir diff --git a/external/lxml/replace-setuptools-with-distutils.patch.1 b/external/lxml/replace-setuptools-with-distutils.patch.1 new file mode 100644 index 000000000000..5275e40312c8 --- /dev/null +++ b/external/lxml/replace-setuptools-with-distutils.patch.1 @@ -0,0 +1,29 @@ +diff -ur lxml.org/setupinfo.py lxml/setupinfo.py +--- lxml.org/setupinfo.py 2023-10-20 10:32:17.921500435 +0200 ++++ lxml/setupinfo.py 2023-10-20 10:33:40.303323572 +0200 +@@ -4,7 +4,7 @@ + import os.path + import subprocess + +-from setuptools.command.build_ext import build_ext as _build_ext ++from distutils.command.build_ext import build_ext as _build_ext + from distutils.core import Extension + from distutils.errors import CompileError, DistutilsOptionError + from versioninfo import get_base_dir +diff -ur lxml.org/setup.py lxml/setup.py +--- lxml.org/setup.py 2023-10-20 10:32:17.949501053 +0200 ++++ lxml/setup.py 2023-10-20 10:33:09.082631759 +0200 +@@ -217,9 +217,10 @@ + # `Unknown distribution option: 'bugtrack_url'` + # which distract folks from real causes of problems when troubleshooting + # bugtrack_url="https://bugs.launchpad.net/lxml", +- project_urls={ +- "Source": "https://github.com/lxml/lxml", +- }, ++ # same as for bugtrack_urls also for project_urls when using distutils instead of setuptools ++ #project_urls={ ++ # "Source": "https://github.com/lxml/lxml", ++ #}, + description=( + "Powerful and Pythonic XML processing library" + " combining libxml2/libxslt with the ElementTree API."