Add %bcond python2
This commit is contained in:
parent
143c074dc0
commit
19e68a9069
@ -1,3 +1,5 @@
|
|||||||
|
%bcond_without python2
|
||||||
|
|
||||||
Name: python-markupsafe
|
Name: python-markupsafe
|
||||||
Version: 1.1.1
|
Version: 1.1.1
|
||||||
Release: 5%{?dist}
|
Release: 5%{?dist}
|
||||||
@ -12,6 +14,7 @@ BuildRequires: gcc
|
|||||||
A library for safe markup escaping.
|
A library for safe markup escaping.
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
%package -n python2-markupsafe
|
%package -n python2-markupsafe
|
||||||
Summary: Implements a XML/HTML/XHTML Markup safe string for Python 2
|
Summary: Implements a XML/HTML/XHTML Markup safe string for Python 2
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
@ -20,6 +23,7 @@ BuildRequires: python2dist(setuptools)
|
|||||||
|
|
||||||
%description -n python2-markupsafe
|
%description -n python2-markupsafe
|
||||||
A library for safe markup escaping. Python 2 version.
|
A library for safe markup escaping. Python 2 version.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package -n python3-markupsafe
|
%package -n python3-markupsafe
|
||||||
@ -37,14 +41,19 @@ A library for safe markup escaping. Python 3 version.
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{with python2}
|
||||||
%py2_build
|
%py2_build
|
||||||
|
%endif
|
||||||
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{with python2}
|
||||||
%py2_install
|
%py2_install
|
||||||
# C code errantly gets installed
|
# C code errantly gets installed
|
||||||
rm %{buildroot}%{python2_sitearch}/markupsafe/*.c
|
rm %{buildroot}%{python2_sitearch}/markupsafe/*.c
|
||||||
|
%endif
|
||||||
|
|
||||||
%py3_install
|
%py3_install
|
||||||
# C code errantly gets installed
|
# C code errantly gets installed
|
||||||
@ -52,15 +61,19 @@ rm %{buildroot}%{python3_sitearch}/markupsafe/*.c
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with python2}
|
||||||
%{__python2} setup.py test
|
%{__python2} setup.py test
|
||||||
|
%endif
|
||||||
%{__python3} setup.py test
|
%{__python3} setup.py test
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
%files -n python2-markupsafe
|
%files -n python2-markupsafe
|
||||||
%license LICENSE.rst
|
%license LICENSE.rst
|
||||||
%doc CHANGES.rst README.rst
|
%doc CHANGES.rst README.rst
|
||||||
%{python2_sitearch}/MarkupSafe-%{version}-py%{python2_version}.egg-info/
|
%{python2_sitearch}/MarkupSafe-%{version}-py%{python2_version}.egg-info/
|
||||||
%{python2_sitearch}/markupsafe/
|
%{python2_sitearch}/markupsafe/
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-markupsafe
|
%files -n python3-markupsafe
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user