Package: feedparser Version: 5.1.2-1 Severity: normal Tags: patch pending Dear maintainer,
As mentioned in #664199, I've prepared an NMU for feedparser (versioned as 5.1.2-1.1). I'll look for a sponsor for an upload in 10 days. Please feel free to tell me if I should wait longer. Regards. -- Etienne Millon
diff -Nru feedparser-5.1.2/debian/changelog feedparser-5.1.2/debian/changelog --- feedparser-5.1.2/debian/changelog 2013-06-10 10:17:16.000000000 +0200 +++ feedparser-5.1.2/debian/changelog 2013-06-10 23:11:50.000000000 +0200 @@ -1,3 +1,15 @@ +feedparser (5.1.2-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Import changes from Ubuntu (version 5.1.2-1ubuntu2) + - Thanks to Barry Warsaw, Chuck Short, Dmitrijs Ledkovs, Jamie Strandboge, + and Michael Terry. + - Build for Python 3 (Closes: #664199) + - Run the test suite during build (Closes: #649172) + - Convert to dh_python2 + + -- Etienne Millon <etienne.mil...@gmail.com> Mon, 10 Jun 2013 23:11:46 +0200 + feedparser (5.1.2-1) unstable; urgency=high * New upstream release. (Closes: #674167) diff -Nru feedparser-5.1.2/debian/compat feedparser-5.1.2/debian/compat --- feedparser-5.1.2/debian/compat 2013-06-10 10:16:34.000000000 +0200 +++ feedparser-5.1.2/debian/compat 2013-06-10 11:23:03.000000000 +0200 @@ -1 +1 @@ -5 +8 diff -Nru feedparser-5.1.2/debian/control feedparser-5.1.2/debian/control --- feedparser-5.1.2/debian/control 2013-06-10 10:17:16.000000000 +0200 +++ feedparser-5.1.2/debian/control 2013-06-10 11:25:20.000000000 +0200 @@ -3,20 +3,37 @@ Priority: optional Maintainer: Carlos Galisteo <cgalis...@k-rolus.net> Uploaders: Debian Python Modules Team <python-modules-t...@lists.alioth.debian.org> -Build-Depends: debhelper (>= 5.0.37.2), python (>=2.6.6-3~), python-setuptools +Build-Depends: debhelper (>= 8), + python (>= 2.6.6-3~), + python-setuptools, + python3, + python3-setuptools Vcs-Svn: svn://svn.debian.org/python-modules/packages/feedparser/trunk Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/feedparser/trunk/ +X-Python-Version: >= 2.6 +X-Python3-Version: >= 3.2 Standards-Version: 3.9.3.1 Homepage: https://code.google.com/p/feedparser/ Package: python-feedparser Architecture: all -Depends: ${python:Depends}, ${misc:Depends} -Recommends: python-libxml2, python-chardet, python-utidylib -XB-Python-Version: ${python:Versions} +Depends: ${misc:Depends}, ${python:Depends} +Recommends: python-chardet, python-libxml2, python-utidylib Description: Universal Feed Parser for Python Python module for downloading and parsing syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91, Userland RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom, and CDF feeds. . It provides the same API to all formats, and sanitizes URIs and HTML. + +Package: python3-feedparser +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends} +Description: Universal Feed Parser for Python + Python module for downloading and parsing syndicated feeds. It can + handle RSS 0.90, Netscape RSS 0.91, Userland RSS 0.91, RSS 0.92, RSS + 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom, and CDF feeds. + . + It provides the same API to all formats, and sanitizes URIs and HTML. + . + This is the Python 3 version of the package. diff -Nru feedparser-5.1.2/debian/patches/series feedparser-5.1.2/debian/patches/series --- feedparser-5.1.2/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ feedparser-5.1.2/debian/patches/series 2013-06-10 11:23:03.000000000 +0200 @@ -0,0 +1 @@ +sgmllib3.patch diff -Nru feedparser-5.1.2/debian/patches/sgmllib3.patch feedparser-5.1.2/debian/patches/sgmllib3.patch --- feedparser-5.1.2/debian/patches/sgmllib3.patch 1970-01-01 01:00:00.000000000 +0100 +++ feedparser-5.1.2/debian/patches/sgmllib3.patch 2013-06-10 11:23:03.000000000 +0200 @@ -0,0 +1,48 @@ +Description: Python 3 does not ship an sgmllib.py module. Upstream feedparser + ships a file called feedparser/sgmllib3.py and suggests installing this on + your sys.path. Rather than that, the Debian packaging installs the file as + feedparser_sgmllib3.py, so extend the import to look for this. +Author: Barry Warsaw <ba...@python.org> + +--- a/feedparser/feedparser.py ++++ b/feedparser/feedparser.py +@@ -201,22 +201,30 @@ + # sgmllib is not available by default in Python 3; if the end user doesn't have + # it available then we'll lose illformed XML parsing, content santizing, and + # microformat support (at least while feedparser depends on BeautifulSoup). ++_SGML_AVAILABLE = 0 + try: + import sgmllib + except ImportError: +- # This is probably Python 3, which doesn't include sgmllib anymore +- _SGML_AVAILABLE = 0 ++ # Debian installs the upstream sgmllib3.py into this location. ++ try: ++ import feedparser_sgmllib3 as sgmllib ++ except ImportError: ++ # This is probably Python 3, which doesn't include sgmllib anymore ++ _SGML_AVAILABLE = 0 + +- # Mock sgmllib enough to allow subclassing later on +- class sgmllib(object): +- class SGMLParser(object): +- def goahead(self, i): +- pass +- def parse_starttag(self, i): +- pass ++ # Mock sgmllib enough to allow subclassing later on ++ class sgmllib(object): ++ class SGMLParser(object): ++ def goahead(self, i): ++ pass ++ def parse_starttag(self, i): ++ pass ++ else: ++ _SGML_AVAILABLE = 1 + else: + _SGML_AVAILABLE = 1 + ++if _SGML_AVAILABLE: + # sgmllib defines a number of module-level regular expressions that are + # insufficient for the XML parsing feedparser needs. Rather than modify + # the variables directly in sgmllib, they're defined here using the same diff -Nru feedparser-5.1.2/debian/python3-feedparser.install feedparser-5.1.2/debian/python3-feedparser.install --- feedparser-5.1.2/debian/python3-feedparser.install 1970-01-01 01:00:00.000000000 +0100 +++ feedparser-5.1.2/debian/python3-feedparser.install 2013-06-10 11:23:03.000000000 +0200 @@ -0,0 +1 @@ +usr/lib/python3/*-packages/* diff -Nru feedparser-5.1.2/debian/python3-feedparser.lintian-overrides feedparser-5.1.2/debian/python3-feedparser.lintian-overrides --- feedparser-5.1.2/debian/python3-feedparser.lintian-overrides 1970-01-01 01:00:00.000000000 +0100 +++ feedparser-5.1.2/debian/python3-feedparser.lintian-overrides 2013-06-10 11:23:03.000000000 +0200 @@ -0,0 +1,4 @@ +# lintian needs to be taught about python3-feedparser, which legitimately +# contains an embedded version of feedparser, obviously. :) + +python3-feedparser: embedded-feedparser-library diff -Nru feedparser-5.1.2/debian/python-feedparser.install feedparser-5.1.2/debian/python-feedparser.install --- feedparser-5.1.2/debian/python-feedparser.install 1970-01-01 01:00:00.000000000 +0100 +++ feedparser-5.1.2/debian/python-feedparser.install 2013-06-10 11:23:03.000000000 +0200 @@ -0,0 +1 @@ +usr/lib/python2.*/*-packages/* diff -Nru feedparser-5.1.2/debian/rules feedparser-5.1.2/debian/rules --- feedparser-5.1.2/debian/rules 2013-06-10 10:17:16.000000000 +0200 +++ feedparser-5.1.2/debian/rules 2013-06-10 11:23:03.000000000 +0200 @@ -1,43 +1,35 @@ #!/usr/bin/make -f export DH_VERBOSE=1 --include /usr/share/python/python.mk -ROOT := debian/python-feedparser +%: + dh $@ --with python2,python3 -clean: - dh_testdir - dh_testroot - python ./setup.py clean - rm -rf build - dh_clean feedparser/*.pyc - -build: -build-arch: build -build-indep: build - -install: build - dh_testdir - dh_testroot - dh_installdirs - python ./setup.py install --root $(ROOT) --no-compile $(py_setup_install_args) - -binary-arch: build install - -binary-indep: build install - dh_testdir - dh_testroot - dh_installchangelogs - #FIXME: Skipping 18MB of tests. - dh_installdocs -Xtests - dh_installexamples - dh_compress - dh_fixperms - dh_python2 - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch +override_dh_auto_build: + dh_auto_build + python3 setup.py build + +override_dh_auto_install: + dh_auto_install + python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb + cp feedparser/sgmllib3.py $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/feedparser_sgmllib3.py + +override_dh_auto_clean: + dh_auto_clean + rm -rf build .*egg-info + +override_dh_auto_test: + # Add back data files which were missing in upstream tarball for 5.1 + cp $(CURDIR)/debian/upstream/*.z feedparser/tests/compression + cp $(CURDIR)/debian/upstream/*.gz feedparser/tests/compression +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + cd feedparser && python ./feedparsertest.py + # FIXME: run tests for python3 too. This requires running 2to3 over + # feedparsertest.py also, and then running it against the already + # converted feedparser.py, but still being able to find the test + # directory. +else + @echo "nocheck set, not running tests" +endif -.PHONY: build clean binary-indep binary-arch binary install configure +override_dh_installdocs: + dh_installdocs -Xtests diff -Nru feedparser-5.1.2/debian/source/include-binaries feedparser-5.1.2/debian/source/include-binaries --- feedparser-5.1.2/debian/source/include-binaries 1970-01-01 01:00:00.000000000 +0100 +++ feedparser-5.1.2/debian/source/include-binaries 2013-06-10 11:23:03.000000000 +0200 @@ -0,0 +1,5 @@ +debian/upstream/deflate-error.z +debian/upstream/deflate.z +debian/upstream/gzip.gz +debian/upstream/gzip-not-gzipped.gz +debian/upstream/gzip-struct-error.gz diff -Nru feedparser-5.1.2/debian/upstream/deflate-error.z feedparser-5.1.2/debian/upstream/deflate-error.z --- feedparser-5.1.2/debian/upstream/deflate-error.z 1970-01-01 01:00:00.000000000 +0100 +++ feedparser-5.1.2/debian/upstream/deflate-error.z 2013-06-10 11:23:03.000000000 +0200 @@ -0,0 +1 @@ +error \ Pas de fin de ligne à la fin du fichier diff -Nru feedparser-5.1.2/debian/upstream/gzip-not-gzipped.gz feedparser-5.1.2/debian/upstream/gzip-not-gzipped.gz --- feedparser-5.1.2/debian/upstream/gzip-not-gzipped.gz 1970-01-01 01:00:00.000000000 +0100 +++ feedparser-5.1.2/debian/upstream/gzip-not-gzipped.gz 2013-06-10 11:23:03.000000000 +0200 @@ -0,0 +1 @@ +error \ Pas de fin de ligne à la fin du fichier diff -Nru feedparser-5.1.2/debian/upstream/README feedparser-5.1.2/debian/upstream/README --- feedparser-5.1.2/debian/upstream/README 1970-01-01 01:00:00.000000000 +0100 +++ feedparser-5.1.2/debian/upstream/README 2013-06-10 11:23:03.000000000 +0200 @@ -0,0 +1,10 @@ +These files were missing from the upstream 5.1 tarball. They were retrieved +from the upstream Subversion repository here: + +svn checkout http://feedparser.googlecode.com/svn/trunk/ feedparser-read-only + +Here is the upstream issue: + +http://code.google.com/p/feedparser/issues/detail?id=313 + +which will be fixed in 5.2