Disable Python 2 entirely

This commit is contained in:
Miro Hrončok 2020-12-21 16:25:33 +01:00
parent c1ca7cbe77
commit fd62f662e2

View File

@ -1,14 +1,6 @@
# There is an exception to ship python2-markupsafe on Fedora, for trac:
# https://pagure.io/fesco/issue/2260
%if 0%{?fedora}
%bcond_without python2
%else
%bcond_with python2
%endif
Name: python-markupsafe
Version: 1.1.1
Release: 8%{?dist}
Release: 9%{?dist}
Summary: Implements a XML/HTML/XHTML Markup safe string for Python
License: BSD
URL: https://pypi.org/project/MarkupSafe/
@ -20,18 +12,6 @@ BuildRequires: gcc
A library for safe markup escaping.
%if %{with python2}
%package -n python2-markupsafe
Summary: Implements a XML/HTML/XHTML Markup safe string for Python 2
BuildRequires: python2-devel
BuildRequires: python2dist(setuptools)
%{?python_provide:%python_provide python2-markupsafe}
%description -n python2-markupsafe
A library for safe markup escaping. Python 2 version.
%endif
%package -n python3-markupsafe
Summary: Implements a XML/HTML/XHTML Markup safe string for Python 3
BuildRequires: python3-devel
@ -47,41 +27,19 @@ A library for safe markup escaping. Python 3 version.
%build
%if %{with python2}
%py2_build
%endif
%py3_build
%install
%if %{with python2}
%py2_install
# C code errantly gets installed
rm %{buildroot}%{python2_sitearch}/markupsafe/*.c
%endif
%py3_install
# C code errantly gets installed
rm %{buildroot}%{python3_sitearch}/markupsafe/*.c
%check
%if %{with python2}
%{__python2} setup.py test
%endif
%{__python3} setup.py test
%if %{with python2}
%files -n python2-markupsafe
%license LICENSE.rst
%doc CHANGES.rst README.rst
%{python2_sitearch}/MarkupSafe-%{version}-py%{python2_version}.egg-info/
%{python2_sitearch}/markupsafe/
%endif
%files -n python3-markupsafe
%license LICENSE.rst
%doc CHANGES.rst README.rst
@ -90,6 +48,9 @@ rm %{buildroot}%{python3_sitearch}/markupsafe/*.c
%changelog
* Mon Dec 21 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1.1-9
- Disable Python 2 entirely
* Wed Nov 25 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1.1-8
- Disable Python 2 in ELN