|
|
d2a091 |
%global __python3 /usr/bin/python3.11
|
|
|
d2a091 |
%global python3_pkgversion 3.11
|
|
|
d2a091 |
|
|
|
d2a091 |
Name: python%{python3_pkgversion}-lxml
|
|
|
d2a091 |
Version: 4.9.2
|
|
|
d2a091 |
Release: 3%{?dist}
|
|
|
d2a091 |
Summary: XML processing library combining libxml2/libxslt with the ElementTree API
|
|
|
d2a091 |
|
|
|
d2a091 |
# The lxml project is licensed under BSD-3-Clause
|
|
|
d2a091 |
# Some code is derived from ElementTree and cElementTree
|
|
|
d2a091 |
# thus using the MIT-CMU elementtree license
|
|
|
d2a091 |
# .xsl schematron files are under the MIT license
|
|
|
d2a091 |
License: BSD and MIT
|
|
|
d2a091 |
URL: https://github.com/lxml/lxml
|
|
|
d2a091 |
# We use the get-lxml-source.sh script to generate the tarball
|
|
|
d2a091 |
# without the isoschematron submodule as it contains a problematic
|
|
|
d2a091 |
# license.
|
|
|
d2a091 |
# See: https://gitlab.com/fedora/legal/fedora-license-data/-/issues/154
|
|
|
d2a091 |
Source0: lxml-%{version}-no-isoschematron.tar.gz
|
|
|
d2a091 |
Source1: get-lxml-source.sh
|
|
|
d2a091 |
|
|
|
d2a091 |
BuildRequires: gcc
|
|
|
d2a091 |
BuildRequires: libxml2-devel
|
|
|
d2a091 |
BuildRequires: libxslt-devel
|
|
|
d2a091 |
|
|
|
d2a091 |
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
d2a091 |
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
d2a091 |
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
d2a091 |
BuildRequires: python%{python3_pkgversion}-Cython
|
|
|
d2a091 |
|
|
|
d2a091 |
%global _description \
|
|
|
d2a091 |
lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It\
|
|
|
d2a091 |
provides safe and convenient access to these libraries using the ElementTree It\
|
|
|
d2a091 |
extends the ElementTree API significantly to offer support for XPath, RelaxNG,\
|
|
|
d2a091 |
XML Schema, XSLT, C14N and much more.
|
|
|
d2a091 |
|
|
|
d2a091 |
%description %{_description}
|
|
|
d2a091 |
|
|
|
d2a091 |
%prep
|
|
|
d2a091 |
%autosetup -n lxml-%{version} -p1
|
|
|
d2a091 |
|
|
|
d2a091 |
# Remove isoschematron module due to problematic license
|
|
|
d2a091 |
sed -i "s/, 'lxml.isoschematron'//" setup.py
|
|
|
d2a091 |
# Remove the doctests for it (the documentation is not shipped)
|
|
|
d2a091 |
# The command [d]eletes all lines from the first pattern to the second
|
|
|
d2a091 |
sed -Ei '/^Schematron$/,/^\(Pre-ISO-Schematron\)$/d' doc/validation.txt
|
|
|
d2a091 |
|
|
|
d2a091 |
# Remove pregenerated Cython C sources
|
|
|
d2a091 |
# We need to do this after %%pyproject_buildrequires because setup.py errors
|
|
|
d2a091 |
# without Cython and without the .c files.
|
|
|
d2a091 |
find -type f -name '*.c' -print -delete >&2
|
|
|
d2a091 |
|
|
|
d2a091 |
%build
|
|
|
d2a091 |
env WITH_CYTHON=true %py3_build
|
|
|
d2a091 |
|
|
|
d2a091 |
%install
|
|
|
d2a091 |
%py3_install
|
|
|
d2a091 |
|
|
|
d2a091 |
%check
|
|
|
d2a091 |
# The tests assume inplace build, so we copy the built library to source-dir.
|
|
|
d2a091 |
# If not done that, Python can either import the tests or the extension modules, but not both.
|
|
|
d2a091 |
cp -a build/lib.%{python3_platform}-*/* src/
|
|
|
d2a091 |
# The options are: verbose, unit, functional
|
|
|
d2a091 |
%{python3} test.py -vuf
|
|
|
d2a091 |
|
|
|
d2a091 |
%files -n python%{python3_pkgversion}-lxml
|
|
|
d2a091 |
%license doc/licenses/BSD.txt doc/licenses/elementtree.txt
|
|
|
d2a091 |
%doc README.rst
|
|
|
d2a091 |
%{python3_sitearch}/lxml/
|
|
|
d2a091 |
%{python3_sitearch}/lxml-*.egg-info/
|
|
|
d2a091 |
|
|
|
d2a091 |
%changelog
|
|
|
d2a091 |
* Thu Feb 16 2023 Charalampos Stratakis <cstratak@redhat.com> - 4.9.2-3
|
|
|
d2a091 |
- Remove the isoschematron submodule
|
|
|
d2a091 |
|
|
|
d2a091 |
* Fri Feb 10 2023 Charalampos Stratakis <cstratak@redhat.com> - 4.9.2-2
|
|
|
d2a091 |
- Remove the extras subpackages
|
|
|
d2a091 |
|
|
|
d2a091 |
* Mon Nov 14 2022 Charalampos Stratakis <cstratak@redhat.com> - 4.9.2-1
|
|
|
d2a091 |
- Initial package
|
|
|
d2a091 |
- Fedora contributions by:
|
|
|
d2a091 |
Alexander Todorov <atodorov@redhat.com>
|
|
|
d2a091 |
Bill Nottingham <notting@fedoraproject.org>
|
|
|
d2a091 |
Charalampos Stratakis <cstratak@redhat.com>
|
|
|
d2a091 |
Dan Horák <dan@danny.cz>
|
|
|
d2a091 |
David Malcolm <dmalcolm@redhat.com>
|
|
|
d2a091 |
Dennis Gilmore <dennis@ausil.us>
|
|
|
d2a091 |
Fabio Alessandro Locati <fale@redhat.com>
|
|
|
d2a091 |
Igor Raits <ignatenkobrain@fedoraproject.org>
|
|
|
d2a091 |
Jason ティビツ <tibbs@fedoraproject.org>
|
|
|
d2a091 |
Jeffrey C. Ollie <jcollie@fedoraproject.org>
|
|
|
d2a091 |
Jesse Keating <jkeating@fedoraproject.org>
|
|
|
d2a091 |
Kevin Fenzi <kevin@scrye.com>
|
|
|
d2a091 |
Lumir Balhar <lbalhar@redhat.com>
|
|
|
d2a091 |
Mikolaj Izdebski <mizdebsk@redhat.com>
|
|
|
d2a091 |
Miro Hrončok <miro@hroncok.cz>
|
|
|
d2a091 |
Peter Robinson <pbrobinson@gmail.com>
|
|
|
d2a091 |
Robert Kuska <rkuska@redhat.com>
|
|
|
d2a091 |
Shahms King <shahms@fedoraproject.org>
|
|
|
d2a091 |
Slavek Kabrda <bkabrda@redhat.com>
|
|
|
d2a091 |
tomspur <tomspur@fedoraproject.org>
|
|
|
d2a091 |
Ville Skyttä <scop@fedoraproject.org>
|