Blame SPECS/python3.11-lxml.spec

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