Blame SPECS/python3.11-lxml.spec

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