diff options
author | Stefano Rivera <stefanor@debian.org> | 2010-06-21 12:30:31 +0000 |
---|---|---|
committer | Stefano Rivera <stefanor@debian.org> | 2010-06-21 12:30:31 +0000 |
commit | 1ea06f883049fff5c901ca6f83fddae6520ad084 (patch) | |
tree | 91a570009d2bedb3753b074d9e0159519c787128 | |
parent | 7ce08c09f4f1823d94681fbac70f31a317c82095 (diff) |
* debian/patches/002_md5_deprecation.dpatch:
Use hashlib instead of deprecated md5 functions. Thanks to Michael Bienia
from Ubuntu (Closes: #517993)
* debian/control:
- No longer Provides ${python:Provides}
- Update Homepage - upstream moved (in watch too)
- Set XS-Python-Version: >= 2.5 (as required by the hashlib patch)
* debian/rules:
- Run setup.py with current python version only.
- Respect nocheck in DEB_BULID_OPTIONS (although failed tests don't abort
build, as several tests fail)
* Bump standards version to 3.8.4 (no additional changes needed).
-rw-r--r-- | debian/changelog | 18 | ||||
-rw-r--r-- | debian/control | 6 | ||||
-rwxr-xr-x | debian/patches/002_md5_deprecation.dpatch | 46 | ||||
-rwxr-xr-x | debian/rules | 16 | ||||
-rw-r--r-- | debian/watch | 2 |
5 files changed, 74 insertions, 14 deletions
diff --git a/debian/changelog b/debian/changelog index 57ddaee..8b6963b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +urlgrabber (3.1.0-6) unstable; urgency=low + + [ Stefano Rivera] + * debian/patches/002_md5_deprecation.dpatch: + Use hashlib instead of deprecated md5 functions. Thanks to Michael Bienia + from Ubuntu (Closes: #517993) + * debian/control: + - No longer Provides ${python:Provides} + - Update Homepage - upstream moved (in watch too) + - Set XS-Python-Version: >= 2.5 (as required by the hashlib patch) + * debian/rules: + - Run setup.py with current python version only. + - Respect nocheck in DEB_BULID_OPTIONS (although failed tests don't abort + build, as several tests fail) + * Bump standards version to 3.8.4 (no additional changes needed). + + -- Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> Mon, 21 Jun 2010 14:14:57 +0200 + urlgrabber (3.1.0-5) unstable; urgency=low [ Piotr Ożarowski ] diff --git a/debian/control b/debian/control index 12820a6..d0e7854 100644 --- a/debian/control +++ b/debian/control @@ -4,15 +4,15 @@ Priority: optional Maintainer: Kevin Coyner <kcoyner@debian.org> Uploaders: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> Build-Depends: debhelper (>= 5), python-all, python-support (>= 0.6), dpatch -Standards-Version: 3.8.3 -Homepage: http://linux.duke.edu/projects/urlgrabber/ +Standards-Version: 3.8.4 +Homepage: http://urlgrabber.baseurl.org/ Vcs-Svn: svn://svn.debian.org/python-modules/packages/urlgrabber/trunk/ Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/urlgrabber/trunk/ +XS-Python-Version: >= 2.5 Package: python-urlgrabber Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} -Provides: ${python:Provides} Description: A high-level cross-protocol url-grabber urlgrabber dramatically simplifies the fetching of files. It is designed to be used in programs that need common (but not necessarily simple) diff --git a/debian/patches/002_md5_deprecation.dpatch b/debian/patches/002_md5_deprecation.dpatch new file mode 100755 index 0000000..2d84c55 --- /dev/null +++ b/debian/patches/002_md5_deprecation.dpatch @@ -0,0 +1,46 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 002_md5_deprecation.dpatch by Michael Bienia <geser@ubuntu.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix deprecation warning from python 2.6 about the md5 module + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' urlgrabber-3.1.0~/urlgrabber/keepalive.py urlgrabber-3.1.0/urlgrabber/keepalive.py +--- urlgrabber-3.1.0~/urlgrabber/keepalive.py 2010-06-21 13:43:49.000000000 +0200 ++++ urlgrabber-3.1.0/urlgrabber/keepalive.py 2010-06-21 13:45:26.000000000 +0200 +@@ -485,7 +485,7 @@ + keepalive_handler.close_all() + + def continuity(url): +- import md5 ++ from hashlib import md5 + format = '%25s: %s' + + # first fetch the file with the normal http handler +@@ -494,7 +494,7 @@ + fo = urllib2.urlopen(url) + foo = fo.read() + fo.close() +- m = md5.new(foo) ++ m = md5(foo) + print format % ('normal urllib', m.hexdigest()) + + # now install the keepalive handler and try again +@@ -504,7 +504,7 @@ + fo = urllib2.urlopen(url) + foo = fo.read() + fo.close() +- m = md5.new(foo) ++ m = md5(foo) + print format % ('keepalive read', m.hexdigest()) + + fo = urllib2.urlopen(url) +@@ -514,7 +514,7 @@ + if f: foo = foo + f + else: break + fo.close() +- m = md5.new(foo) ++ m = md5(foo) + print format % ('keepalive readline', m.hexdigest()) + + def comp(N, url): diff --git a/debian/rules b/debian/rules index a72d839..d30d0dd 100755 --- a/debian/rules +++ b/debian/rules @@ -9,8 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -PYVERS = $(shell pyversions -r) - configure: configure-stamp configure-stamp: dh_testdir @@ -20,10 +18,13 @@ build: patch build-stamp build-stamp: configure-stamp dh_testdir - for py in $(PYVERS); do \ - $$py setup.py build; \ + python setup.py build +ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + # we should set -e, but all the tests fail. + for py in $(shell pyversions -r); do \ $$py test/runtests.py; \ done +endif touch build-stamp clean: clean-patched unpatch @@ -32,9 +33,6 @@ clean-patched: dh_testdir dh_testroot -rm -f build-stamp configure-stamp - for py in $(PYVERS); do \ - $$py setup.py clean; \ - done python setup.py clean find $(CURDIR) -name "*.pyc" -exec rm -f '{}' \; dh_clean @@ -54,9 +52,7 @@ install: build dh_clean -k dh_installdirs # Add here commands to install the package into debian/urlgrabber. - for py in $(PYVERS); do \ - $$py setup.py install --prefix=/usr --root=$(CURDIR)/debian/python-urlgrabber; \ - done + python setup.py install --prefix=/usr --root=$(CURDIR)/debian/python-urlgrabber # remove unneeded documents installed by setup.py -rm -rf $(CURDIR)/debian/python-urlgrabber/usr/share/doc/urlgrabber-3* diff --git a/debian/watch b/debian/watch index ba6906b..4010fbc 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,2 @@ version=3 -http://linux.duke.edu/projects/urlgrabber/download/urlgrabber-(.*)\.tar\.gz +http://urlgrabber.baseurl.org/download/urlgrabber-(.*)\.tar\.gz |