[python-genshi] Update to 0.7 and add a python3 subpackage.

Luke Macken lmacken at fedoraproject.org
Tue Apr 9 23:56:54 UTC 2013


commit 2405363f29bfc7a955ba97abaef647a0914cb86e
Author: Luke Macken <lmacken at redhat.com>
Date:   Tue Apr 9 19:52:19 2013 -0400

    Update to 0.7 and add a python3 subpackage.
    
     • Fixes: #847225 and #914407 FTBFS bugs
     • Removes explicit --with-speedups buildflag since it's on by default, and
       currently broken on python 3: http://genshi.edgewall.org/ticket/555

 .gitignore         |    1 +
 python-genshi.spec |   79 ++++++++++++++++++++++++++++++++++++++++++----------
 sources            |    2 +-
 3 files changed, 66 insertions(+), 16 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fcf5636..7d17db5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 Genshi-0.5.1.tar.bz2
 /Genshi-0.6.tar.gz
+/Genshi-0.7.tar.gz
diff --git a/python-genshi.spec b/python-genshi.spec
index dad4cc7..f7aff0a 100644
--- a/python-genshi.spec
+++ b/python-genshi.spec
@@ -1,6 +1,10 @@
+%if 0%{?fedora} > 12
+%global with_python3 1
+%endif
+
 Name:           python-genshi
-Version:        0.6
-Release:        6%{?dist}
+Version:        0.7
+Release:        1%{?dist}
 Summary:        Toolkit for stream-based generation of output for the web
 
 Group:          Development/Languages
@@ -9,44 +13,89 @@ URL:            http://genshi.edgewall.org/
 
 Source0:        http://ftp.edgewall.com/pub/genshi/Genshi-%{version}.tar.gz
 
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires:  python-devel
-BuildRequires:  python-setuptools-devel
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
 
 Requires:       python-babel >= 0.8
 
+%if 0%{?with_python3}
+BuildRequires:      python3-devel
+BuildRequires:      python3-setuptools
+
+Requires:           python3-babel >= 0.8
+%endif
+
 %description
 Genshi is a Python library that provides an integrated set of
 components for parsing, generating, and processing HTML, XML or other
 textual content for output generation on the web. The major feature is
 a template language, which is heavily inspired by Kid.
 
+%if 0%{?with_python3}
+%package -n python3-genshi
+Summary:        Toolkit for stream-based generation of output for the web
+Group:          Development/Languages
+
+%description -n python3-genshi
+Genshi is a Python library that provides an integrated set of
+components for parsing, generating, and processing HTML, XML or other
+textual content for output generation on the web. The major feature is
+a template language, which is heavily inspired by Kid.
+%endif
+
 %prep
 %setup0 -q -n Genshi-%{version}
 
+# Remove bundled egg-info in case it exists
+rm -rf %{modname}.egg-info
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
 find examples -type f | xargs chmod a-x
 
 %build
-%{__python} setup.py --with-speedups build
+%{__python2} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
 
 %install
-rm -rf %{buildroot}
-%{__python} setup.py --with-speedups install -O1 --skip-build --root %{buildroot}
+%{__python2} 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
 
 %check
-%{__python} setup.py test
-
-%clean
-rm -rf %{buildroot}
+%{__python2} setup.py test
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif
 
 %files
-%defattr(-,root,root,-)
-%doc ChangeLog COPYING doc examples README.txt 
+%doc ChangeLog COPYING doc examples README.txt
 %{python_sitearch}/Genshi-%{version}-py*.egg-info
 %{python_sitearch}/genshi
 
+%if 0%{?with_python3}
+%files -n python3-genshi
+%doc ChangeLog COPYING doc examples README.txt
+%{python3_sitearch}/Genshi-%{version}-py*.egg-info
+%{python3_sitearch}/genshi
+%endif
+
 %changelog
+* Tue Apr  9 2013 Luke Macken <lmacken at redhat.com> - 0.7-1
+- Update to 0.7
+- Add a python3 subpackage
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
diff --git a/sources b/sources
index ec7f6a1..1491d17 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-604e8b23b4697655d36a69c2d8ef7187  Genshi-0.6.tar.gz
+54e64dd69da3ec961f86e686e0848a82  Genshi-0.7.tar.gz


More information about the scm-commits mailing list