Remove Python 2 subpackage
This commit is contained in:
+2
-74
@@ -1,12 +1,3 @@
|
||||
# Enable Python 3 builds for Fedora + EPEL >6
|
||||
%if 0%{?fedora} || 0%{?rhel} > 6
|
||||
# If the definition isn't available for python3_pkgversion, define it
|
||||
%{?!python3_pkgversion:%global python3_pkgversion 3}
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
%global pypi_name defusedxml
|
||||
# define the license macro as doc if licensedir is not defined for
|
||||
# compatibility with EPEL
|
||||
@@ -18,24 +9,13 @@ Release: 1%{?dist}
|
||||
Summary: XML bomb protection for Python stdlib modules
|
||||
License: Python
|
||||
URL: https://github.com/tiran/defusedxml
|
||||
Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||
Source0: %{pypi_source}
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
# No python2-setuptools on EL 7
|
||||
BuildRequires: python2-setuptools
|
||||
|
||||
%if 0%{with_python3}
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
|
||||
%if 0%{?with_python3_other}
|
||||
BuildRequires: python%{python3_other_pkgversion}-setuptools
|
||||
BuildRequires: python%{python3_other_pkgversion}-devel
|
||||
%endif # with_python3_other
|
||||
%endif # with_python3
|
||||
|
||||
%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
|
||||
@@ -43,18 +23,7 @@ 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 python2-%{pypi_name}
|
||||
Summary: XML bomb protection for Python stdlib modules
|
||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
||||
|
||||
%description -n python2-%{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 2 build.
|
||||
|
||||
%if 0%{with_python3}
|
||||
%package -n python%{python3_pkgversion}-%{pypi_name}
|
||||
Summary: XML bomb protection for Python stdlib modules
|
||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
|
||||
@@ -66,72 +35,31 @@ 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.
|
||||
|
||||
%if 0%{?with_python3_other}
|
||||
%package -n python%{python3_other_pkgversion}-%{pypi_name}
|
||||
Summary: XML bomb protection for Python stdlib modules
|
||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
|
||||
|
||||
%description -n python%{python3_other_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_other_pkgversion} build.
|
||||
%endif # with_python3_other
|
||||
%endif # with_python3
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{pypi_name}-%{version}
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if 0%{with_python3}
|
||||
%py3_build
|
||||
%if 0%{?with_python3_other}
|
||||
%py3_other_build
|
||||
%endif # with_python3_other
|
||||
%endif # with_python3
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%if 0%{with_python3}
|
||||
%py3_install
|
||||
%if 0%{?with_python3_other}
|
||||
%py3_other_install
|
||||
%endif # with_python3_other
|
||||
%endif # with_python3
|
||||
|
||||
%check
|
||||
%{__python2} tests.py
|
||||
%if 0%{with_python3}
|
||||
%{__python3} tests.py
|
||||
%endif # with_python3
|
||||
|
||||
%files -n python2-%{pypi_name}
|
||||
%doc README.txt README.html CHANGES.txt
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/%{pypi_name}/
|
||||
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/
|
||||
|
||||
%if 0%{with_python3}
|
||||
%files -n python%{python3_pkgversion}-%{pypi_name}
|
||||
%doc README.txt README.html CHANGES.txt
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/%{pypi_name}/
|
||||
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/
|
||||
|
||||
%if 0%{?with_python3_other}
|
||||
%files -n python%{python3_other_pkgversion}-%{pypi_name}
|
||||
%doc README.txt README.html CHANGES.txt
|
||||
%license LICENSE
|
||||
%{python3_other_sitelib}/%{pypi_name}/
|
||||
%{python3__other_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/
|
||||
%endif # with_python3_other
|
||||
%endif # with_python3
|
||||
|
||||
%changelog
|
||||
* Thu May 09 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-1
|
||||
- Update to 0.6.0 (#1699639)
|
||||
- Remove Python 2 subpackage
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
Reference in New Issue
Block a user