Remove the isoschematron submodule
Resolves: rhbz#2157708
This commit is contained in:
parent
0eff636201
commit
7f6d5f61df
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/lxml-4.9.1.tar.gz
|
||||
/lxml-4.9.2.tar.gz
|
||||
/lxml-4.9.2-no-isoschematron.tar.gz
|
||||
|
29
get-lxml-source.sh
Executable file
29
get-lxml-source.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#! /bin/bash -ex
|
||||
|
||||
# Download a release of lxml (if missing) and remove the isoschematron module from it
|
||||
|
||||
version=$1
|
||||
|
||||
if [ -z "${version}" ]; then
|
||||
echo "Usage: $0 VERSION" >& 2
|
||||
echo "" >& 2
|
||||
echo "example: $0 4.9.2" >& 2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
versionedname=lxml-${version}
|
||||
orig_archive=${versionedname}.tar.gz
|
||||
new_archive=${versionedname}-no-isoschematron.tar.gz
|
||||
|
||||
if [ ! -e ${orig_archive} ]; then
|
||||
wget -N https://files.pythonhosted.org/packages/source/l/lxml/${orig_archive}
|
||||
fi
|
||||
|
||||
deleted_module=lxml-${version}/src/lxml/isoschematron/
|
||||
deleted_test=lxml-${version}/src/lxml/tests/test_isoschematron.py
|
||||
|
||||
# tar --delete does not operate on compressed archives, so do
|
||||
# gz decompression explicitly
|
||||
gzip --decompress ${orig_archive}
|
||||
tar -v --delete -f ${orig_archive//.gz} {$deleted_module,$deleted_test}
|
||||
gzip -cf ${orig_archive//.gz} > ${new_archive}
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name: python%{python3_pkgversion}-lxml
|
||||
Version: 4.9.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: XML processing library combining libxml2/libxslt with the ElementTree API
|
||||
|
||||
# The lxml project is licensed under BSD-3-Clause
|
||||
@ -12,7 +12,12 @@ Summary: XML processing library combining libxml2/libxslt with the Elemen
|
||||
# .xsl schematron files are under the MIT license
|
||||
License: BSD and MIT
|
||||
URL: https://github.com/lxml/lxml
|
||||
Source: %{pypi_source lxml}
|
||||
# We use the get-lxml-source.sh script to generate the tarball
|
||||
# without the isoschematron submodule as it contains a problematic
|
||||
# license.
|
||||
# See: https://gitlab.com/fedora/legal/fedora-license-data/-/issues/154
|
||||
Source0: lxml-%{version}-no-isoschematron.tar.gz
|
||||
Source1: get-lxml-source.sh
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libxml2-devel
|
||||
@ -34,6 +39,12 @@ XML Schema, XSLT, C14N and much more.
|
||||
%prep
|
||||
%autosetup -n lxml-%{version} -p1
|
||||
|
||||
# Remove isoschematron module due to problematic license
|
||||
sed -i "s/, 'lxml.isoschematron'//" setup.py
|
||||
# Remove the doctests for it (the documentation is not shipped)
|
||||
# The command [d]eletes all lines from the first pattern to the second
|
||||
sed -Ei '/^Schematron$/,/^\(Pre-ISO-Schematron\)$/d' doc/validation.txt
|
||||
|
||||
# Remove pregenerated Cython C sources
|
||||
# We need to do this after %%pyproject_buildrequires because setup.py errors
|
||||
# without Cython and without the .c files.
|
||||
@ -54,11 +65,14 @@ cp -a build/lib.%{python3_platform}-*/* src/
|
||||
|
||||
%files -n python%{python3_pkgversion}-lxml
|
||||
%license doc/licenses/BSD.txt doc/licenses/elementtree.txt
|
||||
%doc README.rst src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt
|
||||
%doc README.rst
|
||||
%{python3_sitearch}/lxml/
|
||||
%{python3_sitearch}/lxml-*.egg-info/
|
||||
|
||||
%changelog
|
||||
* Thu Feb 16 2023 Charalampos Stratakis <cstratak@redhat.com> - 4.9.2-3
|
||||
- Remove the isoschematron submodule
|
||||
|
||||
* Fri Feb 10 2023 Charalampos Stratakis <cstratak@redhat.com> - 4.9.2-2
|
||||
- Remove the extras subpackages
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (lxml-4.9.2.tar.gz) = 4597784c96219145fef30607f257097ad312264a6796e65b3dc74463853cd29f55379b6a903b401c1120750126b57f58dd9fc459dd453e57030883fc76b87ea3
|
||||
SHA512 (lxml-4.9.2-no-isoschematron.tar.gz) = 3ee80967dfa69c840a27ad99546727346f8bb058ed64bf93d2aa8959fb3000e78c1227f4b8709d25aaadeb9a4ccdf97a03eb53a1171de8feda93fbeaa15a8b39
|
||||
|
Loading…
Reference in New Issue
Block a user