Update to 5.2.1 (rhbz#2272165)

This commit is contained in:
Lumir Balhar 2024-04-02 11:36:35 +02:00
commit dbf7e6096c
5 changed files with 50 additions and 105 deletions

View file

@ -1,5 +1,5 @@
Name: python-lxml
Version: 5.1.0
Version: 5.2.1
Release: %autorelease
Summary: XML processing library combining libxml2/libxslt with the ElementTree API
@ -16,9 +16,8 @@ URL: https://github.com/lxml/lxml
Source0: lxml-%{version}-no-isoschematron-rng.tar.gz
Source1: get-lxml-source.sh
# Fix test_elementtree with Expat 2.6.0
# Merged upstream
Patch: https://github.com/lxml/lxml/pull/407.patch
# Skip some tests if lxml_html_clean is not available
Patch: https://github.com/lxml/lxml/pull/417.patch
BuildRequires: gcc
BuildRequires: libxml2-devel
@ -29,6 +28,7 @@ BuildRequires: python3-devel
# - [cssselect] Requires cssselect BuildRequires lxml
# - [html5] Requires html5lib BuildRequires lxml
# - [htmlsoup] Requires beautifulsoup4 Requires lxml
# - [html_clean] Requires lxml-html-clean Requires lxml
# Hence we provide a bcond to disable the extras altogether.
# By default, the extras are disabled in RHEL, to avoid dependencies.
%bcond extras %{undefined rhel}
@ -47,6 +47,7 @@ Summary: %{summary}
Suggests: python3-lxml+cssselect
Suggests: python3-lxml+html5
Suggests: python3-lxml+htmlsoup
Suggests: python3-lxml+html_clean
%endif
%description -n python3-lxml %{_description}
@ -54,7 +55,7 @@ Suggests: python3-lxml+htmlsoup
Python 3 version.
%if %{with extras}
%pyproject_extras_subpkg -n python3-lxml cssselect html5 htmlsoup
%pyproject_extras_subpkg -n python3-lxml cssselect html5 htmlsoup html_clean
%endif
%prep
@ -67,7 +68,7 @@ sed -i "s/Cython.*/Cython/" requirements.txt
sed -i 's/"Cython.*",/"Cython",/' pyproject.toml
%generate_buildrequires
%pyproject_buildrequires -x source%{?with_extras:,cssselect,html5,htmlsoup}
%pyproject_buildrequires -x source%{?with_extras:,cssselect,html5,htmlsoup,html_clean}
%build
# Remove pregenerated Cython C sources