diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2021-11-03 09:50:09 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2021-11-03 10:00:09 +0100 |
commit | 7b941e58ab088a25a8e0a7f6e13e4e5b9dd93c37 (patch) | |
tree | 8ce83e531f723b36fd19fd97fa988ec73de047c2 | |
parent | 7efe24307b77fb66771544c5c9730064629d468c (diff) | |
download | python-lxml-7b941e58ab088a25a8e0a7f6e13e4e5b9dd93c37.tar.gz |
Switch to latest libxml2 2.9.12+ (unreleased) that has fixes for traversing lxml's fake root trees.
-rw-r--r-- | .github/workflows/wheels.yml | 2 | ||||
-rw-r--r-- | CHANGES.txt | 5 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | buildlibxml.py | 16 |
4 files changed, 21 insertions, 4 deletions
diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index bfd8e9ef..6117f9e6 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -118,7 +118,7 @@ jobs: python_version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.7-v7.3.3", "pypy-3.8-v7.3.7"] runs-on: ${{ matrix.os }} - env: { LIBXML2_VERSION: 2.9.10, LIBXSLT_VERSION: 1.1.34, MACOSX_DEPLOYMENT_TARGET: 10.14 } + env: { LIBXML2_VERSION: 2.9.12, LIBXSLT_VERSION: 1.1.34, MACOSX_DEPLOYMENT_TARGET: 10.14 } steps: - uses: actions/checkout@v2 diff --git a/CHANGES.txt b/CHANGES.txt index 72a123b6..f0fa06ba 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,6 +19,11 @@ Bugs fixed as integers or float values in Python 3.6 and later. It now adheres to the number format of the XML spec again. +Other changes +------------- + +* Wheels include libxml2 2.9.12+ and libxslt 1.1.34. + 4.6.4 (2021-11-01) ================== @@ -13,7 +13,7 @@ CYTHON_WITH_COVERAGE?=$(shell $(PYTHON) -c 'import Cython.Coverage; import sys; CYTHON3_WITH_COVERAGE?=$(shell $(PYTHON3) -c 'import Cython.Coverage; import sys; assert not hasattr(sys, "pypy_version_info")' >/dev/null 2>/dev/null && echo " --coverage" || true) PYTHON_BUILD_VERSION ?= * -MANYLINUX_LIBXML2_VERSION=2.9.10 +MANYLINUX_LIBXML2_VERSION=2.9.12 MANYLINUX_LIBXSLT_VERSION=1.1.34 MANYLINUX_CFLAGS=-O3 -g1 -pipe -fPIC -flto MANYLINUX_LDFLAGS=-flto diff --git a/buildlibxml.py b/buildlibxml.py index 086d9115..08b465de 100644 --- a/buildlibxml.py +++ b/buildlibxml.py @@ -121,6 +121,7 @@ def get_prebuilt_libxml2xslt(download_dir, static_include_dirs, static_library_d ## Routines to download and build libxml2/xslt from sources: LIBXML2_LOCATION = 'http://xmlsoft.org/sources/' +LIBXSLT_LOCATION = 'http://xmlsoft.org/sources/' LIBICONV_LOCATION = 'https://ftp.gnu.org/pub/gnu/libiconv/' ZLIB_LOCATION = 'https://zlib.net/' match_libfile_version = re.compile('^[^-]*-([.0-9-]+)[.].*').match @@ -214,7 +215,15 @@ def download_libxml2(dest_dir, version=None): #version_re = re.compile(r'LATEST_LIBXML2_IS_([0-9.]+[0-9](?:-[abrc0-9]+)?)') version_re = re.compile(r'libxml2-([0-9.]+[0-9]).tar.gz') filename = 'libxml2-%s.tar.gz' - return download_library(dest_dir, LIBXML2_LOCATION, 'libxml2', + + if version == "2.9.12": + # Temporarily using the latest master (2.9.12+) until there is a release that supports lxml again. + from_location = "https://gitlab.gnome.org/GNOME/libxml2/-/archive/dea91c97debeac7c1aaf9c19f79029809e23a353/" + version = "dea91c97debeac7c1aaf9c19f79029809e23a353" + else: + from_location = LIBXML2_LOCATION + + return download_library(dest_dir, from_location, 'libxml2', version_re, filename, version=version) @@ -223,7 +232,7 @@ def download_libxslt(dest_dir, version=None): #version_re = re.compile(r'LATEST_LIBXSLT_IS_([0-9.]+[0-9](?:-[abrc0-9]+)?)') version_re = re.compile(r'libxslt-([0-9.]+[0-9]).tar.gz') filename = 'libxslt-%s.tar.gz' - return download_library(dest_dir, LIBXML2_LOCATION, 'libxslt', + return download_library(dest_dir, LIBXSLT_LOCATION, 'libxslt', version_re, filename, version=version) @@ -441,6 +450,9 @@ def build_libxml2xslt(download_dir, build_dir, except Exception: pass # this isn't required, so ignore any errors if not has_current_lib("libxml2", libxml2_dir): + if not os.path.exists(os.path.join(libxml2_dir, "configure")): + # Allow building from git sources by running autoconf etc. + libxml2_configure_cmd[0] = "./autogen.sh" cmmi(libxml2_configure_cmd, libxml2_dir, multicore, **call_setup) # Fix up libxslt configure script (needed up to and including 1.1.34) |