mrunge pushed to python-bleach (f21). "fox requirements py2 and py3 (rhbz#1231426)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon Jun 15 15:39:50 UTC 2015
From 5147da143c69b64640bb482cb4f7647faf7beb66 Mon Sep 17 00:00:00 2001
From: Matthias Runge <mrunge at redhat.com>
Date: Mon, 15 Jun 2015 10:22:00 +0200
Subject: fox requirements py2 and py3 (rhbz#1231426)
diff --git a/python-bleach.spec b/python-bleach.spec
index 27ae6ab..c9cfc3e 100644
--- a/python-bleach.spec
+++ b/python-bleach.spec
@@ -1,13 +1,13 @@
%if 0%{?fedora} > 12
-%bcond_without python3
+%global with_python3 1
%else
-%bcond_with python3
+%global with_python3 0
%endif
%global pypi_name bleach
Name: python-%{pypi_name}
Version: 1.4.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: An easy whitelist-based HTML-sanitizing tool
License: ASL 2.0
@@ -25,7 +25,12 @@ BuildRequires: python-html5lib >= 0.999
Requires: python-six
Requires: python-html5lib >= 0.999
-%if %{with python3}
+%description
+Bleach is an HTML sanitizing library that escapes or strips markup and
+attributes based on a white list.
+
+%if 0%{?with_python3}
+%package -n python3-%{pypi_name}
BuildRequires: python3-devel
BuildRequires: python3-nose >= 1.3
# Runtime requirements are test requirements, mirror them here
@@ -34,7 +39,6 @@ BuildRequires: python3-html5lib >= 0.999
Requires: python3-html5lib >= 0.999
Requires: python3-six
-%package -n python3-%{pypi_name}
Summary: An easy whitelist-based HTML-sanitizing tool
%description -n python3-%{pypi_name}
@@ -42,16 +46,13 @@ Bleach is an HTML sanitizing library that escapes or strips markup and
attributes based on a white list.
%endif
-%description
-Bleach is an HTML sanitizing library that escapes or strips markup and
-attributes based on a white list.
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
-%if %{with python3}
+%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
@@ -59,7 +60,7 @@ cp -a . %{py3dir}
%build
%{__python2} setup.py build
-%if %{with python3}
+%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
@@ -68,7 +69,7 @@ popd
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
-%if %{with python3}
+%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
popd
@@ -77,7 +78,7 @@ popd
%check
%{__python2} setup.py test
-%if %{with python3}
+%if 0%{?with_python3}
%{__python3} setup.py test
%endif
@@ -88,7 +89,7 @@ popd
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
-%if %{with python3}
+%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
@@ -97,6 +98,10 @@ popd
%endif
%changelog
+* Mon Jun 15 2015 Matthias Runge <mrunge at redhat.com> - 1.4.1-3
+- fix requirements to install only a single version, not both
+ (rhbz#1231426)
+
* Thu Feb 12 2015 Matthias Runge <mrunge at redhat.com> - 1.4.1-2
- add python3 subpackage
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/python-bleach.git/commit/?h=f21&id=5147da143c69b64640bb482cb4f7647faf7beb66
More information about the scm-commits
mailing list