[python-backlash] Add a Python3 subpackage and fix the pre-release version

Luke Macken lmacken at fedoraproject.org
Thu Apr 4 18:36:41 UTC 2013


commit bd7e68bb66d7b056cba2b7cc93aa0137fab981fc
Author: Luke Macken <lmacken at redhat.com>
Date:   Thu Apr 4 14:34:16 2013 -0400

    Add a Python3 subpackage and fix the pre-release version

 python-backlash.spec |   60 +++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 55 insertions(+), 5 deletions(-)
---
diff --git a/python-backlash.spec b/python-backlash.spec
index 1aa059f..cb526f5 100644
--- a/python-backlash.spec
+++ b/python-backlash.spec
@@ -1,22 +1,31 @@
+%if 0%{?fedora} > 12
+%global with_python3 1
+%endif
+
 %global modname backlash
+%global prerelease a2
 
 Name:               python-backlash
-Version:            0.0.1a2
-Release:            2%{?dist}
+Version:            0.0.1
+Release:            0.3.%{prerelease}%{?dist}
 Summary:            Standalone WebOb port of the Werkzeug Debugger
 
 Group:              Development/Libraries
 License:            MIT
 URL:                http://pypi.python.org/pypi/backlash
-Source0:            http://pypi.python.org/packages/source/b/%{modname}/%{modname}-%{version}.tar.gz
+Source0:            http://pypi.python.org/packages/source/b/%{modname}/%{modname}-%{version}%{prerelease}.tar.gz
 Patch0:             %{name}-ubuntu-font.patch
 
 BuildArch:          noarch
 
 BuildRequires:      python2-devel
-
 Requires:           python-webob
 
+%if 0%{?with_python3}
+BuildRequires:      python3-devel
+Requires:           python3-webob
+%endif
+
 
 %description
 backlash is a standalone version of the Werkzeug Debugger based on WebOb
@@ -26,29 +35,70 @@ backlash has born as a future replacement for WebError in upcoming TurboGears2
 versions.
 
 
+%if 0%{?with_python3}
+%package -n python3-backlash
+Summary:            Standalone WebOb port of the Werkzeug Debugger with Python3 support meant to replace WebError in TurboGears2
+Group:              Development/Libraries
+
+%description -n python3-backlash
+backlash is a standalone version of the Werkzeug Debugger based on WebOb
+adapted to support for Python3.
+
+backlash has born as a future replacement for WebError in upcoming
+TurboGears2 versions.
+%endif
+
+
 %prep
-%setup -q -n %{modname}-%{version}
+%setup -q -n %{modname}-%{version}%{prerelease}
 %patch0 -p1
 
 # Remove bundled egg-info in case it exists
 rm -rf %{modname}.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
 %{__python} setup.py install -O1 --skip-build --root=%{buildroot}
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
+popd
+%endif
+
 
 %files
 %doc README.rst
 %{python_sitelib}/%{modname}/
 %{python_sitelib}/%{modname}-%{version}*
 
+%if 0%{?with_python3}
+%files -n python3-backlash
+%doc README.rst
+%{python3_sitelib}/%{modname}/
+%{python3_sitelib}/%{modname}-%{version}*
+%endif
+
 
 %changelog
+* Thu Apr 04 2013 Luke Macken <lmacken at redhat.com> 0.0.1-0.3.a2
+- Build the python3 subpackage
+- Fix pre-release version
+
 * Wed Apr 03 2013 Luke Macken <lmacken at redhat.com> 0.0.1a2-2
 - Remove the non-free ubuntu font
 - Require python-webob


More information about the scm-commits mailing list