Here is a patch that updates the package to 0.7, adds Python 3 support, and switches to the pybuild build system (simpler than cdbs). This release would also close a few other bugs as seen in the changelog entry.
Index: debian/changelog =================================================================== --- debian/changelog (revision 26664) +++ debian/changelog (working copy) @@ -1,8 +1,28 @@ -genshi (0.6-4) UNRELEASED; urgency=low +genshi (0.7-1) UNRELEASED; urgency=low + [ Barry Warsaw ] + * Team upload. + - Closes: #731280 + - Closes: #713747 + - Closes: #673935 + * New upstream release. + * d/control: + - Add python3-genshi binary package. + - Update Build-Depends for pybuild and remove cdbs. + - Standards-Version: 3.9.5 with no further changes needed. + - Add X-Python3-Version header. + - wrap-and-sort + * d/rules: + - Switch to pybuild and add Python 3 support as a byproduct. + - Removed cdbs and simplified. + * d/watch: Updated + * d/compat: Update to v8. + * d/patches/fix_tests_failure_with_python27.patch: Updated. + + [ Jakub Wilk ] * Use canonical URIs for Vcs-* fields. - -- Jakub Wilk <jw...@debian.org> Sun, 05 May 2013 16:00:57 +0200 + -- Barry Warsaw <ba...@debian.org> Wed, 04 Dec 2013 12:13:02 -0500 genshi (0.6-3) unstable; urgency=low Index: debian/compat =================================================================== --- debian/compat (revision 26664) +++ debian/compat (working copy) @@ -1 +1 @@ -5 +8 Index: debian/control =================================================================== --- debian/control (revision 26664) +++ debian/control (working copy) @@ -3,26 +3,43 @@ Priority: optional Maintainer: Arnaud Fontaine <ar...@debian.org> Uploaders: Debian Python Modules Team <python-modules-t...@lists.alioth.debian.org> -Build-Depends: debhelper (>= 5.0.37.2), - cdbs (>= 0.4.90~), +Build-Depends: debhelper (>= 8), + dh-python, python-all-dev (>= 2.6.6-3~), - python-setuptools (>= 0.6b3) -Standards-Version: 3.9.2 + python-setuptools (>= 0.6b3), + python3-all, + python3-setuptools +Standards-Version: 3.9.5 X-Python-Version: >= 2.4 +X-Python3-Version: >= 3.3 Homepage: http://genshi.edgewall.org/ Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/genshi/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/genshi/trunk/ Package: python-genshi Architecture: any -Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} -Suggests: doc-base, python-pkg-resources, python-genshi-doc +Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} +Suggests: doc-base, python-genshi-doc, python-pkg-resources Description: Python XML-based template engine Genshi is a Python library that provides an integrated set of components for parsing, generating, and processing HTML or XML content in a uniform manner. The major feature is a template language, which is heavily inspired by Kid. + . + This is the Python 2 version. +Package: python3-genshi +Architecture: any +Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends} +Suggests: doc-base, python-genshi-doc, python3-pkg-resources +Description: Python XML-based template engine + Genshi is a Python library that provides an integrated set of + components for parsing, generating, and processing HTML or XML + content in a uniform manner. The major feature is a template + language, which is heavily inspired by Kid. + . + This is the Python 3 version. + Package: python-genshi-doc Architecture: all Section: doc Index: debian/patches/fix_tests_failure_with_python27.patch =================================================================== --- debian/patches/fix_tests_failure_with_python27.patch (revision 26664) +++ debian/patches/fix_tests_failure_with_python27.patch (working copy) @@ -1,58 +1,14 @@ -Description: Two tests which used to fail in earlier Pythons, now succeed in - Python 2.7.3. Adjust the tests to check for success in order to fix a FTBFS - in Ubuntu 12.10. -Author: Barry Warsaw <ba...@ubuntu.com>, Arnaud Fontaine <ar...@debian.org> -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/genshi/+bug/935516 -Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661441 +Description: Skip test which still fails in Python 2.7.6. +Author: Barry Warsaw <ba...@debian.org>, Arnaud Fontaine <ar...@debian.org> Bug: http://genshi.edgewall.org/ticket/500 -Bug: http://genshi.edgewall.org/ticket/501 -Index: genshi-0.6/genshi/filters/tests/html.py -=================================================================== ---- genshi-0.6.orig/genshi/filters/tests/html.py 2010-04-22 21:09:52.000000000 +0900 -+++ genshi-0.6/genshi/filters/tests/html.py 2012-11-24 14:35:02.116021695 +0900 -@@ -365,9 +365,24 @@ +--- a/genshi/filters/tests/test_html.py ++++ b/genshi/filters/tests/test_html.py +@@ -410,6 +410,7 @@ + html = HTML(u'&junk;') + self.assertEquals('&junk;', (html | HTMLSanitizer()).render()) + ++ @unittest.skip('http://genshi.edgewall.org/ticket/500#comment:3') + def test_sanitize_remove_script_elem(self): + html = HTML(u'<script>alert("Foo")</script>') self.assertEquals('', (html | HTMLSanitizer()).render()) - html = HTML('<SCRIPT SRC="http://example.com/"></SCRIPT>') - self.assertEquals('', (html | HTMLSanitizer()).render()) -- self.assertRaises(ParseError, HTML, '<SCR\0IPT>alert("foo")</SCR\0IPT>') -- self.assertRaises(ParseError, HTML, -- '<SCRIPT&XYZ SRC="http://example.com/"></SCRIPT>') -+ -+ # Before Python 2.7.3, HTMLParser() raises a ParseError -+ try: -+ html = HTML('<SCR\0IPT>alert("foo")</SCR\0IPT>') -+ except ParseError: -+ pass -+ else: -+ self.assertEquals('<SCR\x00IPT>alert("foo")', -+ (html | HTMLSanitizer()).render()) -+ -+ # Before Python 2.7.3, HTMLParser() raises a ParseError -+ try: -+ html = HTML('<SCRIPT&XYZ SRC="http://example.com/"></SCRIPT>') -+ except ParseError: -+ pass -+ else: -+ self.assertEquals('<SCRIPT&XYZ; SRC="http://example.com/">', -+ (html | HTMLSanitizer()).render()) - - def test_sanitize_remove_onclick_attr(self): - html = HTML('<div onclick=\'alert("foo")\' />') -@@ -437,9 +452,13 @@ - # Case-insensitive protocol matching - html = HTML('<IMG SRC=\'JaVaScRiPt:alert("foo")\'>') - self.assertEquals('<img/>', (html | HTMLSanitizer()).render()) -- # Grave accents (not parsed) -- self.assertRaises(ParseError, HTML, -- '<IMG SRC=`javascript:alert("RSnake says, \'foo\'")`>') -+ # Grave accents. Before Python 2.7.3, HTMLParser() raises a ParseError -+ try: -+ html = HTML('<IMG SRC=`javascript:alert("RSnake says, \'foo\'")`>') -+ except ParseError: -+ pass -+ else: -+ self.assertEquals('<img/>', (html | HTMLSanitizer()).render()) - # Protocol encoded using UTF-8 numeric entities - html = HTML('<IMG SRC=\'javascri' - 'pt:alert("foo")\'>') Index: debian/python-genshi-doc.install =================================================================== --- debian/python-genshi-doc.install (revision 26664) +++ debian/python-genshi-doc.install (working copy) @@ -1,6 +1,6 @@ -doc/common/style usr/share/doc/python-genshi-doc/html/common doc/*.gif usr/share/doc/python-genshi-doc/html +doc/*.html usr/share/doc/python-genshi-doc/html doc/*.png usr/share/doc/python-genshi-doc/html -doc/*.html usr/share/doc/python-genshi-doc/html doc/*.txt usr/share/doc/python-genshi-doc/txt doc/api usr/share/doc/python-genshi-doc/html +doc/common/style usr/share/doc/python-genshi-doc/html/common Index: debian/rules =================================================================== --- debian/rules (revision 26664) +++ debian/rules (working copy) @@ -1,58 +1,7 @@ #!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/python-distutils.mk +export PYBUILD_NAME=genshi -# Don't compress .py files -DEB_COMPRESS_EXCLUDE := .py .txt .cfg .js - -# Install egg-info directories -DEB_PYTHON_INSTALL_ARGS_ALL += --single-version-externally-managed -DEB_DESTDIR=debian/python-genshi - -# Enable the C extension -DEB_PYTHON_SETUP_CMD += --with-speedups - -ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) -binary-install/python-genshi:: - set -ex; for py in $(shell pyversions -vr); do \ - PYTHONPATH=$(cdbs_python_destdir)/usr/lib/python$$py/site-packages \ - python$$py setup.py test; \ - done; -endif - -clean:: - -rm -rf $(CURDIR)/Genshi.egg-info - -## SVN snapshot (changelog entry with a version: a.b.c~svnREVISION-d) -## Get the source from the SVN upstream repository, then generate the -## documentation (which is in the release tarballs but not in the SVN -## repository and requires python-docutils and python-epydoc packages) -## and finally create the tarball -#SVN_URL := https://svn.edgewall.org/repos/genshi/trunk -#SVN_REVISION := $(shell echo $(DEB_UPSTREAM_VERSION)|sed 's/.*~svn\([0-9]*\)/\1/') -#SVN_DEB_TARBALL_DIR := $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) -#SVN_DEB_TARBALL := $(CURDIR)/../$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz -# -## Adapted to CDBS and Genshi from: -## http://wiki.debian.org/SandroTosi/Svn_get-orig-source -#get-orig-source: -# -rm -rf $(SVN_DEB_TARBALL_DIR) $(SVN_DEB_TARBALL) -# -# svn export -r $(SVN_REVISION) $(SVN_URL) $(SVN_DEB_TARBALL_DIR) -# -# ( cd $(SVN_DEB_TARBALL_DIR) && python setup.py build_doc ) -# -# # Get rid of byte-compile files created when building the -# # documentation -# find $(SVN_DEB_TARBALL_DIR) -name '*.pyc' -exec rm '{}' \; -# -# GZIP='--best --no-name' tar czf $(SVN_DEB_TARBALL) -C $(SVN_DEB_TARBALL_DIR)/../ \ -# $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) -# -# -rm -rf $(SVN_DEB_TARBALL_DIR) -# -# echo "Created: $(SVN_DEB_TARBALL)" -# -#.PHONY: get-orig-source +%: + dh $@ --with python2,python3 --buildsystem=pybuild Index: debian/watch =================================================================== --- debian/watch (revision 26664) +++ debian/watch (working copy) @@ -1,2 +1,2 @@ version=3 -opts=pasv ftp://ftp.edgewall.com/pub/genshi/Genshi-([0-9._-]*)\.tar\.gz +http://ftp.edgewall.com/pub/genshi/Genshi-(.*).tar.gz