[python-webtest] Added python3 subpackage

Ralph Bean ☃ ralph at fedoraproject.org
Tue Feb 26 16:15:10 UTC 2013


commit 522d35d4e26d6567dbecb967fed8753eee338dc8
Author: Ralph Bean <rbean at redhat.com>
Date:   Tue Feb 19 16:16:10 2013 -0500

    Added python3 subpackage

 python-webtest.spec |   68 +++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 63 insertions(+), 5 deletions(-)
---
diff --git a/python-webtest.spec b/python-webtest.spec
index 8cfd8da..5d15671 100644
--- a/python-webtest.spec
+++ b/python-webtest.spec
@@ -1,8 +1,12 @@
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
+%if 0%{?fedora} > 12
+%global with_python3 1
+%endif
+
 Name:           python-webtest
 Version:        1.3.4
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Helper to test WSGI applications
 
 Group:          Development/Languages
@@ -16,6 +20,15 @@ BuildRequires:  python-setuptools
 BuildRequires:  python-nose
 BuildRequires:  python-webob
 BuildRequires:  python-dtopt
+
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-nose
+BuildRequires:  python3-webob1.2
+BuildRequires:  python3-dtopt
+%endif
+
 Requires:       python-webob
 
 %description
@@ -25,35 +38,80 @@ requests to that application, without starting up an HTTP server.
 This provides convenient full-stack testing of applications written
 with any WSGI-compatible framework.
 
+%if 0%{?with_python3}
+%package -n python3-webtest
+Summary:        Helper to test WSGI applications
+Group:          Development/Languages
+
+Requires:       python3-webtest
+
+%description -n python3-webtest
+WebTest wraps any WSGI application and makes it easy to send test
+requests to that application, without starting up an HTTP server.
+
+This provides convenient full-stack testing of applications written
+with any WSGI-compatible framework.
+%endif
+
+
 %prep
 %setup -q -n WebTest-%{version}
 
+# Remove bundled egg info if it exists.
+rm -rf *.egg-info
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
 
 %build
 %{__python} setup.py build
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
 
 %install
 %{__rm} -rf %{buildroot}
-%{__python} setup.py install --skip-build --root %{buildroot}
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
+
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
 
- 
 %clean
 %{__rm} -rf %{buildroot}
 
-
 %check
 PYTHONPATH=$(pwd) %{__python} setup.py test
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+PYTHONPATH=$(pwd) %{__python3} setup.py test
+popd
+%endif
 
 %files
-%defattr(-,root,root,-)
 %doc docs/*
 %{python_sitelib}/webtest
 %{python_sitelib}/*.egg-info
 
+%if 0%{?with_python3}
+%files -n python3-webtest
+%doc docs/*
+%{python3_sitelib}/webtest
+%{python3_sitelib}/*.egg-info
+%endif
 
 %changelog
+* Tue Feb 19 2013 Ralph Bean <rbean at redhat.com> - 1.3.4-4
+- Added python3 subpackage
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.4-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list