[python-zope-event/el6] Added python3 handling for epel Refer to http://fedoraproject.org/wiki/Packaging/Python#Example_spec

Tomas Dabasinskas tdabasin at fedoraproject.org
Tue Sep 11 01:25:29 UTC 2012


commit e67bf9cd73a4353fbe01e796aa5d0aec077fdf32
Author: Tomas DabaĊĦinskas <tomas at redhat.com>
Date:   Tue Sep 11 01:21:16 2012 +1000

    Added python3 handling for epel
    Refer to http://fedoraproject.org/wiki/Packaging/Python#Example_spec_file
    koji scratch build for dist-6E-epel target successful
    http://koji.fedoraproject.org/koji/taskinfo?taskID=4473584

 python-zope-event.spec |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/python-zope-event.spec b/python-zope-event.spec
index 962f194..1a103d3 100644
--- a/python-zope-event.spec
+++ b/python-zope-event.spec
@@ -1,3 +1,7 @@
+%if 0%{?fedora} > 12
+%global with_python3 1
+%endif
+
 Name:           python-zope-event
 Version:        3.5.1
 Release:        4%{?dist}
@@ -11,9 +15,13 @@ BuildArch:      noarch
 
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
+BuildRequires:  python-sphinx
+
+# python 3
+%if 0%{?with_python3}
 BuildRequires:  python3-devel
 BuildRequires:  python3-setuptools
-BuildRequires:  python-sphinx
+%endif
 
 %description
 The zope.event package provides a simple event system. It provides
@@ -24,6 +32,8 @@ zope.event can be found in zope.component.)
 
 This package contains the version for Python 2.
 
+# python 3
+%if 0%{?with_python3}
 %package -n python3-zope-event
 Summary:        Zope Event Publication (Python 3)
 
@@ -35,6 +45,7 @@ on which more sophisticated event dispatching systems can be built.
 zope.event can be found in zope.component.)
 
 This package contains the version for Python 3.
+%endif
 
 %prep
 %setup -q -n zope.event-%{version}
@@ -42,7 +53,10 @@ This package contains the version for Python 3.
 
 %build
 %{__python} setup.py build
+# python 3
+%if 0%{?with_python3}
 %{__python3} setup.py build
+%endif
 
 # build the sphinx documents
 pushd docs
@@ -53,12 +67,18 @@ popd
 
 %install
 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+# python 3
+%if 0%{?with_python3}
 %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%endif
 
 %check
 %{__python} setup.py test
+# python 3
+%if 0%{?with_python3} 
 %{__python3} setup.py test
- 
+%endif
+
 %files
 %doc CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt
 %doc docs/_build/html/
@@ -68,6 +88,8 @@ popd
 %{python_sitelib}/zope.event-*.egg-info
 %{python_sitelib}/zope.event-*-nspkg.pth
 
+# python 3
+%if 0%{?with_python3} 
 %files -n python3-zope-event
 %doc CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt
 %doc docs/_build/html/
@@ -77,10 +99,15 @@ popd
 %dir %{python3_sitelib}/zope/
 %{python3_sitelib}/zope.event-*.egg-info
 %{python3_sitelib}/zope.event-*-nspkg.pth
+%endif
 
 
 
 %changelog
+* Tue Sep 11 2012 Tomas DabaĊĦinskas <tomas at redhat.com> - 3.5.1-5
+- Added python3 handling for epel
+- Refer to http://fedoraproject.org/wiki/Packaging/Python#Example_spec_file
+
 * Sat Aug 04 2012 David Malcolm <dmalcolm at redhat.com> - 3.5.1-4
 - rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
 


More information about the scm-commits mailing list