66 lines
2.1 KiB
RPMSpec
66 lines
2.1 KiB
RPMSpec
%global pypi_name defusedxml
|
|
%global base_version 0.7.1
|
|
#global prerel ...
|
|
%global upstream_version %{base_version}%{?prerel}
|
|
Name: python-%{pypi_name}
|
|
Version: %{base_version}%{?prerel:~%{prerel}}
|
|
Release: %autorelease
|
|
Summary: XML bomb protection for Python stdlib modules
|
|
License: Python
|
|
URL: https://github.com/tiran/defusedxml
|
|
Source0: %{pypi_source %{pypi_name} %{upstream_version}}
|
|
|
|
# Drop deprecated unittest.makeSuite()
|
|
# From https://github.com/tiran/defusedxml/commit/4e6cea5f5b
|
|
# (This no longer skips lxml tests when lxml is not installed.)
|
|
Patch: drop-makeSuite.patch
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
BuildRequires: python%{python3_pkgversion}-lxml
|
|
|
|
%description
|
|
The defusedxml package contains several Python-only workarounds and fixes for
|
|
denial of service and other vulnerabilities in Python's XML libraries. In order
|
|
to benefit from the protection you just have to import and use the listed
|
|
functions / classes from the right defusedxml module instead of the original
|
|
module.
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{pypi_name}
|
|
Summary: %{summary}
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
|
|
|
|
%description -n python%{python3_pkgversion}-%{pypi_name}
|
|
The defusedxml package contains several Python-only workarounds and fixes for
|
|
denial of service and other vulnerabilities in Python's XML libraries. In order
|
|
to benefit from the protection you just have to import and use the listed
|
|
functions / classes from the right defusedxml module instead of the original
|
|
module. This is the python%{python3_pkgversion} build.
|
|
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{pypi_name}-%{upstream_version}
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
%install
|
|
%py3_install
|
|
|
|
%check
|
|
%{python3} tests.py
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-%{pypi_name}
|
|
%doc README.txt README.html CHANGES.txt
|
|
%license LICENSE
|
|
%{python3_sitelib}/%{pypi_name}/
|
|
%{python3_sitelib}/%{pypi_name}-%{upstream_version}-py%{python3_version}.egg-info/
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|