diff -Nru dh-python-1.20140511/debian/changelog dh-python-1.20140128/debian/changelog --- dh-python-1.20140511/debian/changelog 2015-08-15 09:28:25.000000000 +0000 +++ dh-python-1.20140128/debian/changelog 2014-03-27 20:13:15.000000000 +0000 @@ -1,47 +1,103 @@ -dh-python (1.20140511-1~precise) precise; urgency=low +dh-python (1.20140128-1ubuntu8~ctools1) precise; urgency=medium - * build for precise + * Backport for Ubuntu Cloud Archive, based on Debian Wheezy backports: + - Replace libpython3-stdlib build dependency with python3.2 + - Update default/supported Python versions (in a fallback code, + if python_defaults missing) + - Use dpkg-divert to replace python3's dh_python3 and python's dh_python2 + and drop Breaks/Replaces + - Remove the diversions on removal. + - Patch rtupdate calls for compatibility with Ubuntu py3clean. + - d/p/align-12.04-python-versions.patch: Align python/python3 versions + with those in Ubuntu 12.04. - -- Pavel Sofishchenko Sat, 15 Aug 2015 14:28:20 +0500 + -- James Page Thu, 27 Mar 2014 14:51:17 +0000 -dh-python (1.20140511-1~bpo70+1) wheezy-backports; urgency=low +dh-python (1.20140128-1ubuntu8) trusty; urgency=medium - * Rebuild for wheezy-backports. - * Replace libpython3-stdlib build dependency with python3.2 - * Update default/supported Python versions (in a fallback code, - if python_defaults missing) - * Use dpkg-divert to replace python3's dh_python3 and python's dh_python2 - and drop Breaks/Replaces - * dh_python2: do not rename extension files, Wheezy's python2.7 doesn't - support multiarch tuples - * Disable multiarch dependencies (":any" not supported that well in Wheezy) - * dh_python2: create pyshared symlinks again - * Update pydist maps to generate Wheezy dependencies (if package name in - Jessie is different) + * Add no-python2.6.diff: Fix test failures on checking for python2.6 + specific bits. - -- Piotr Ożarowski Tue, 01 Jul 2014 21:31:59 +0200 + -- Martin Pitt Mon, 24 Mar 2014 17:36:23 +0100 -dh-python (1.20140511-1) unstable; urgency=medium +dh-python (1.20140128-1ubuntu7) trusty; urgency=medium - [ Piotr Ożarowski ] - * pybuild: do not invoke clean commands for missing interpreters - (and thus do not require all interpreter versions to be installed while - building source package outside build environment, closes: 737091) - * dh_python2: no longer moves files to /usr/share/pyshared if there's only - one supported Python 2.X version and doesn't create /usr/lib/pyshared - symlinks for extensions (as other helper tools are now deprecated) - * Show fix_shebang's error messages only in debug mode, closes: 745581 + * Run tests with python3.4 instead of python3.3. + + -- Matthias Klose Mon, 24 Mar 2014 11:10:25 +0100 + +dh-python (1.20140128-1ubuntu5) trusty; urgency=medium + + * Drop Python 3.3 as a supported Python 3 version. + + -- Matthias Klose Sun, 23 Mar 2014 09:17:26 +0100 + +dh-python (1.20140128-1ubuntu4) trusty; urgency=medium + + * Update supported Python 3 versions in tests, to fix autopkgtest + failure. + + -- Dmitry Shachnev Fri, 07 Mar 2014 22:53:55 +0400 + +dh-python (1.20140128-1ubuntu3) trusty; urgency=medium + + * Make dh-python autopkgtest depend on build-essential and fakeroot. + + -- Dmitry Shachnev Thu, 27 Feb 2014 11:56:50 +0400 + +dh-python (1.20140128-1ubuntu2~cloud0) precise-icehouse; urgency=medium + + * Backport for Ubuntu Cloud Archive, based on Debian Wheezy backports: + - Replace libpython3-stdlib build dependency with python3.2 + - Update default/supported Python versions (in a fallback code, + if python_defaults missing) + - Use dpkg-divert to replace python3's dh_python3 and python's dh_python2 + and drop Breaks/Replaces + - Remove the diversions on removal. + - Patch rtupdate calls for compatibility with Ubuntu py3clean. + - d/p/align-12.04-python-versions.patch: Align python/python3 versions + with those in Ubuntu 12.04. + + -- James Page Mon, 24 Feb 2014 10:57:21 +0000 + +dh-python (1.20140128-1ubuntu2) trusty; urgency=medium - [ Matthias Klose ] - * Remove empty directories when moving files. + * Remove empty directories when moving files. - -- Piotr Ożarowski Sun, 11 May 2014 20:59:15 +0200 + -- Matthias Klose Wed, 12 Feb 2014 15:14:23 +0100 + +dh-python (1.20140128-1ubuntu1~cloud0) precise-icehouse; urgency=medium + + * Backport for Ubuntu Cloud Archive, based on Debian Wheezy backports: + - Replace libpython3-stdlib build dependency with python3.2 + - Update default/supported Python versions (in a fallback code, + if python_defaults missing) + - Use dpkg-divert to replace python3's dh_python3 and python's dh_python2 + and drop Breaks/Replaces + - Remove the diversions on removal. + - Patch rtupdate calls for compatibility with Ubuntu py3clean. + - d/p/align-12.04-python-versions.patch: Align python/python3 versions + with those in Ubuntu 12.04. + + -- James Page Mon, 10 Feb 2014 11:06:06 +0200 + +dh-python (1.20140128-1ubuntu1) trusty; urgency=medium + + * Merge with Debian unstable, remaining changes: + - debian/control: Make dh-python Multi-Arch: foreign. + - Add patch debian/patches/no-pyshare.diff: + + Don't move files to /usr/share/pyshared anymore. + + Don't create extension symlinks in /usr/lib/pyshared/pythonX.Y anymore. + - Add patch debian/patches/python3.4.diff: + + Add python3.4 as a supported version. + + -- Dmitry Shachnev Wed, 29 Jan 2014 17:24:45 +0400 dh-python (1.20140128-1) unstable; urgency=low * dh_python3, dh_pypy: add support for debian/package.pyremove files (closes: 730777) - * dh_python3: add multiarch tuples to all already tagged extensions + * dh_python3: add multiarch tuples to all already tagged extensions if when more than one Python 3 version is supported (closes: 733128) * Make sure only first line is taken into account while checking shebangs (closes: 732308) @@ -60,6 +116,91 @@ -- Piotr Ożarowski Tue, 28 Jan 2014 18:20:19 +0100 +dh-python (1.20131021-1ubuntu8) trusty; urgency=medium + + * Taken from upstream: + dh_python3: add multiarch tuples to all already tagged extensions if + when more than one Python 3 version is supported (closes: 733128). + + -- Matthias Klose Tue, 07 Jan 2014 23:11:01 +0100 + +dh-python (1.20131021-1ubuntu7~cloud0) precise-icehouse; urgency=medium + + * Backport for Ubuntu Cloud Archive, based on Debian Wheezy backports: + - Replace libpython3-stdlib build dependency with python3.2 + - Update default/supported Python versions (in a fallback code, + if python_defaults missing) + - Use dpkg-divert to replace python3's dh_python3 and python's dh_python2 + and drop Breaks/Replaces + - Remove the diversions on removal. + - Patch rtupdate calls for compatibility with Ubuntu py3clean. + - d/p/align-12.04-python-versions.patch: Align python/python3 versions + with those in Ubuntu 12.04. + + -- James Page Mon, 06 Jan 2014 14:23:02 +0000 + +dh-python (1.20131021-1ubuntu7) trusty; urgency=medium + + * Fix dhpython/_defaults.py. Still doesn't rename 3.4 extensions + to the multiarch name. + + -- Matthias Klose Mon, 30 Dec 2013 20:55:17 +0100 + +dh-python (1.20131021-1ubuntu6) trusty; urgency=medium + + * Disable the correct failing test. + + -- Matthias Klose Sat, 21 Dec 2013 17:15:02 +0100 + +dh-python (1.20131021-1ubuntu5) trusty; urgency=low + + * Don't create extension symlinks in /usr/lib/pyshared/pythonX.Y anymore. + * Disable nosetests in autopkg tests until these are fixed. + * dhpython/_defaults.py: Add python3.4 as a supported version. + + -- Matthias Klose Sat, 21 Dec 2013 14:50:06 +0100 + +dh-python (1.20131021-1ubuntu4) trusty; urgency=medium + + * Don't move files to /usr/share/pyshared anymore. + + -- Matthias Klose Fri, 20 Dec 2013 00:39:05 +0100 + +dh-python (1.20131021-1ubuntu3) trusty; urgency=medium + + * Make the package Multi-Arch: foreign. + + -- Matthias Klose Sat, 07 Dec 2013 19:32:35 +0100 + +dh-python (1.20131021-1ubuntu2~cloud0) precise-icehouse; urgency=low + + * Backport for Ubuntu Cloud Archive, based on Debian Wheezy backports: + - Replace libpython3-stdlib build dependency with python3.2 + - Update default/supported Python versions (in a fallback code, + if python_defaults missing) + - Use dpkg-divert to replace python3's dh_python3 and python's dh_python2 + and drop Breaks/Replaces + - Remove the diversions on removal. + - Patch rtupdate calls for compatibility with Ubuntu py3clean. + - d/p/align-12.04-python-versions.patch: Align python/python3 versions + with those in Ubuntu 12.04. + + -- James Page Mon, 09 Dec 2013 08:57:53 +0000 + +dh-python (1.20131021-1ubuntu2) trusty; urgency=low + + * Add drop_nonexisting_versions.patch: In tests/Makefile, drop Python 2.6 + and 3.2 as supported, we do not have them in Debian and Ubuntu any more. + (Closes: #727674) + + -- Martin Pitt Tue, 05 Nov 2013 08:52:12 +0100 + +dh-python (1.20131021-1ubuntu1) trusty; urgency=low + + * Add missing python3-all-dbg test dependency for debian/tests/nosetests. + + -- Martin Pitt Thu, 24 Oct 2013 09:44:27 +0200 + dh-python (1.20131021-1) unstable; urgency=low * dh_python2: fix renaming debug extensions with multiarch tuples @@ -86,6 +227,26 @@ -- Piotr Ożarowski Thu, 17 Oct 2013 22:24:25 +0200 +dh-python (1.20131003-1~cloud1) precise-icehouse; urgency=low + + * d/p/align-12.04-python-versions.patch: Align python/python3 versions + with those in Ubuntu 12.04. + + -- James Page Thu, 05 Dec 2013 10:25:52 +0000 + +dh-python (1.20131003-1~cloud0) precise-icehouse; urgency=low + + * Backport for Ubuntu Cloud Archive, based on Debian Wheezy backports. + - Replace libpython3-stdlib build dependency with python3.2 + - Update default/supported Python versions (in a fallback code, + if python_defaults missing) + - Use dpkg-divert to replace python3's dh_python3 and python's dh_python2 + and drop Breaks/Replaces + - Remove the diversions on removal. + - Patch rtupdate calls for compatibility with Ubuntu py3clean. + + -- James Page Wed, 04 Dec 2013 14:33:02 +0000 + dh-python (1.20131003-1) unstable; urgency=low * Revert python-docutils build dependency change (to avoid circular diff -Nru dh-python-1.20140511/debian/control dh-python-1.20140128/debian/control --- dh-python-1.20140511/debian/control 2014-07-01 18:20:52.000000000 +0000 +++ dh-python-1.20140128/debian/control 2014-03-27 20:04:47.000000000 +0000 @@ -1,10 +1,10 @@ Source: dh-python Section: python Priority: optional -Maintainer: Piotr Ożarowski +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Piotr Ożarowski Uploaders: Stefano Rivera , Barry Warsaw -Build-Depends: debhelper (>= 9), python3-minimal, - python3.2, +Build-Depends: debhelper (>= 9), python3-minimal, python3.2, # provides rst2man command (python3-docutils not used to avoid circular deps): python-docutils Standards-Version: 3.9.5 @@ -15,7 +15,8 @@ Package: dh-python Architecture: all -Depends: ${misc:Depends}, ${python3:Depends} +Depends: ${misc:Depends}, ${python3:Depends}, python3 (>= 3.2.3-0~) +Multi-Arch: foreign Description: Debian helper tools for packaging Python libraries and applications This package contains: * pybuild - invokes various build systems for requested Python versions in diff -Nru dh-python-1.20140511/debian/links dh-python-1.20140128/debian/links --- dh-python-1.20140511/debian/links 2014-07-01 18:20:13.000000000 +0000 +++ dh-python-1.20140128/debian/links 2014-03-27 20:04:47.000000000 +0000 @@ -1,4 +1,4 @@ /usr/share/dh-python/pybuild /usr/bin/pybuild /usr/share/dh-python/dh_pypy /usr/bin/dh_pypy -/usr/share/dh-python/dh_python2 /usr/bin/dh_python2 +/usr/share/dh-python/dh_python2 /usr/bin/dh_python2 /usr/share/dh-python/dh_python3 /usr/bin/dh_python3 diff -Nru dh-python-1.20140511/debian/patches/align-12.04-python-versions.patch dh-python-1.20140128/debian/patches/align-12.04-python-versions.patch --- dh-python-1.20140511/debian/patches/align-12.04-python-versions.patch 1970-01-01 00:00:00.000000000 +0000 +++ dh-python-1.20140128/debian/patches/align-12.04-python-versions.patch 2014-03-27 20:04:47.000000000 +0000 @@ -0,0 +1,13 @@ +--- a/dhpython/__init__.py ++++ b/dhpython/__init__.py +@@ -25,8 +25,8 @@ PKG_PREFIX_MAP = {'cpython2': 'python', + 'pypy': 'pypy'} + + # minimum version required for compile/clean scripts: +-MINPYCDEP = {'cpython2': 'python:any (>= 2.7.5-5~)', +- 'cpython3': 'python3:any (>= 3.3.2-2~)', ++MINPYCDEP = {'cpython2': 'python:any (>= 2.7.3-0ubuntu2~)', ++ 'cpython3': 'python3:any (>= 3.2.3-0ubuntu1~)', + 'pypy': 'pypy'} + + PUBLIC_DIR_RE = { diff -Nru dh-python-1.20140511/debian/patches/disable_ext_renaming_in_dh_python2.patch dh-python-1.20140128/debian/patches/disable_ext_renaming_in_dh_python2.patch --- dh-python-1.20140511/debian/patches/disable_ext_renaming_in_dh_python2.patch 2014-07-01 18:20:13.000000000 +0000 +++ dh-python-1.20140128/debian/patches/disable_ext_renaming_in_dh_python2.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -diff --git a/dh_python2 b/dh_python2 -index 8279047..1a6123e 100755 ---- a/dh_python2 -+++ b/dh_python2 -@@ -323,7 +323,7 @@ def main(): - dest='clean_dbg_pkg', default=True, - help='do not remove files from debug packages') - parser.add_option('--no-ext-rename', action='store_true', -- default=False, help='do not add magic tags nor multiarch' -+ default=True, help='do not add magic tags nor multiarch' - ' tuples to extension file names)') - parser.add_option('--no-shebang-rewrite', action='store_true', - default=False, help='do not rewrite shebangs') diff -Nru dh-python-1.20140511/debian/patches/disable_multiarch_dependencies.patch dh-python-1.20140128/debian/patches/disable_multiarch_dependencies.patch --- dh-python-1.20140511/debian/patches/disable_multiarch_dependencies.patch 2015-08-15 09:17:58.000000000 +0000 +++ dh-python-1.20140128/debian/patches/disable_multiarch_dependencies.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ ---- a/dhpython/__init__.py -+++ b/dhpython/__init__.py -@@ -25,8 +25,8 @@ - 'pypy': 'pypy'} - - # minimum version required for compile/clean scripts: --MINPYCDEP = {'cpython2': 'python:any (>= 2.7.5-5~)', -- 'cpython3': 'python3:any (>= 3.3.2-2~)', -+MINPYCDEP = {'cpython2': 'python (>= 2.6.6-3)', -+ 'cpython3': 'python3 (>= 3.2.3-0~)', - 'pypy': 'pypy'} - - PUBLIC_DIR_RE = { ---- a/dhpython/depends.py -+++ b/dhpython/depends.py -@@ -48,8 +48,8 @@ - self.ipkg_tpl_ma = self.ipkg_tpl - self.ipkg_vtpl_ma = self.ipkg_vtpl - else: -- self.ipkg_tpl_ma = self.ipkg_tpl + ':any' -- self.ipkg_vtpl_ma = self.ipkg_vtpl + ':any' -+ self.ipkg_tpl_ma = self.ipkg_tpl -+ self.ipkg_vtpl_ma = self.ipkg_vtpl - - self.depends = set() - self.recommends = [] -@@ -155,7 +155,7 @@ - self.depend(MINPYCDEP[self.impl]) - - for ipreter in stats['shebangs']: -- self.depend("%s%s" % (ipreter, ':any' if self.impl == 'pypy' else '')) -+ self.depend(str(ipreter)) - - supported_versions = supported(self.impl) - default_version = default(self.impl) diff -Nru dh-python-1.20140511/debian/patches/no-python2.6.diff dh-python-1.20140128/debian/patches/no-python2.6.diff --- dh-python-1.20140511/debian/patches/no-python2.6.diff 1970-01-01 00:00:00.000000000 +0000 +++ dh-python-1.20140128/debian/patches/no-python2.6.diff 2014-03-27 20:04:47.000000000 +0000 @@ -0,0 +1,39 @@ +Index: dh-python-1.20140128/tests/t202/Makefile +=================================================================== +--- dh-python-1.20140128.orig/tests/t202/Makefile 2014-01-28 18:20:25.000000000 +0100 ++++ dh-python-1.20140128/tests/t202/Makefile 2014-03-24 17:24:28.459439873 +0100 +@@ -4,7 +4,7 @@ + clean: clean-common + + check: +- test -f debian/python-foo/usr/lib/python2.6/dist-packages/foo.py +- test -f debian/python-foo/usr/lib/python2.6/dist-packages/bar/bar.py ++ test -f debian/python-foo/usr/lib/python2.7/dist-packages/foo.py ++ test -f debian/python-foo/usr/lib/python2.7/dist-packages/bar/bar.py + grep -q pycompile debian/python-foo/DEBIAN/postinst + grep -q pyclean debian/python-foo/DEBIAN/prerm +Index: dh-python-1.20140128/tests/t204/Makefile +=================================================================== +--- dh-python-1.20140128.orig/tests/t204/Makefile 2014-01-28 18:20:25.000000000 +0100 ++++ dh-python-1.20140128/tests/t204/Makefile 2014-03-24 17:32:41.815422300 +0100 +@@ -5,7 +5,7 @@ + + check: + grep -q python2.6 debian/foo/usr/share/foo/foo.py +- grep -q Depends:.*python2.6 debian/foo/DEBIAN/control ++ grep -q Depends:.*python debian/foo/DEBIAN/control + #grep -q python2.5 debian/foo/usr/share/bar/bar.py + #grep -q Depends:.*python2.5 debian/foo/DEBIAN/control + grep -q python2.4 debian/foo/usr/share/foo/baz.py +Index: dh-python-1.20140128/tests/t206/Makefile +=================================================================== +--- dh-python-1.20140128.orig/tests/t206/Makefile 2014-01-28 18:20:25.000000000 +0100 ++++ dh-python-1.20140128/tests/t206/Makefile 2014-03-24 17:34:39.211418118 +0100 +@@ -13,6 +13,6 @@ + grep -q '\-V 2.5 /usr/share/bar25' debian/foo/usr/share/python/runtime.d/foo.rtupdate + grep -q '/usr/share/bar25 \-V 2.5' debian/foo/DEBIAN/postinst + # python2.6 hardcoded via shebang +- grep -q Depends:.*python2.6 debian/foo/DEBIAN/control ++ #grep -q Depends:.*python2.6 debian/foo/DEBIAN/control + grep -q '\-V 2.6 /usr/share/foo' debian/foo/usr/share/python/runtime.d/foo.rtupdate + grep -q '/usr/share/foo \-V 2.6' debian/foo/DEBIAN/postinst diff -Nru dh-python-1.20140511/debian/patches/no-python3.3.diff dh-python-1.20140128/debian/patches/no-python3.3.diff --- dh-python-1.20140511/debian/patches/no-python3.3.diff 1970-01-01 00:00:00.000000000 +0000 +++ dh-python-1.20140128/debian/patches/no-python3.3.diff 2014-03-27 20:04:47.000000000 +0000 @@ -0,0 +1,147 @@ +Index: b/dhpython/interpreter.py +=================================================================== +--- a/dhpython/interpreter.py ++++ b/dhpython/interpreter.py +@@ -309,8 +309,8 @@ + >>> i = Interpreter('python') + >>> i.cache_file('foo.py', Version('3.1')) + 'foo.pyc' +- >>> i.cache_file('bar/foo.py', '3.3') +- 'bar/__pycache__/foo.cpython-33.pyc' ++ >>> i.cache_file('bar/foo.py', '3.4') ++ 'bar/__pycache__/foo.cpython-34.pyc' + """ + version = Version(version or self.version) + last_char = 'o' if '-O' in self.options else 'c' +@@ -335,8 +335,8 @@ + """Return Python magic tag (used in __pycache__ dir to tag files). + + >>> i = Interpreter('python') +- >>> i.magic_tag(version='3.3') +- 'cpython-33' ++ >>> i.magic_tag(version='3.4') ++ 'cpython-34' + """ + version = Version(version or self.version) + if self.impl.startswith('cpython') and version << Version('3.2'): +@@ -378,8 +378,8 @@ + + >>> Interpreter('python2.7').include_dir + '/usr/include/python2.7' +- >>> Interpreter('python3.3-dbg').include_dir +- '/usr/include/python3.3dm' ++ >>> Interpreter('python3.4-dbg').include_dir ++ '/usr/include/python3.4dm' + """ + if self.impl == 'pypy': + return '/usr/lib/pypy/include' +@@ -482,7 +482,7 @@ + + >>> Interpreter('python3.1').suggest_pkg_name('foo') + 'python3-foo' +- >>> Interpreter('python3.3').suggest_pkg_name('foo') ++ >>> Interpreter('python3.4').suggest_pkg_name('foo') + 'python3-foo' + >>> Interpreter('python2.7-dbg').suggest_pkg_name('bar') + 'python-bar-dbg' +Index: b/pybuild +=================================================================== +--- a/pybuild ++++ b/pybuild +@@ -102,7 +102,7 @@ + + def get_option(name, interpreter=None, version=None, default=None): + if interpreter: +- # try PYBUILD_NAME_python3.3-dbg (or hardcoded interpreter) ++ # try PYBUILD_NAME_python3.4-dbg (or hardcoded interpreter) + i = interpreter.format(version=version or '') + opt = "PYBUILD_{}_{}".format(name.upper(), i) + if opt in environ: +Index: b/pybuild.rst +=================================================================== +--- a/pybuild.rst ++++ b/pybuild.rst +@@ -191,8 +191,8 @@ + * `--disable test/python2.5-dbg` - disables tests for python2.5-dbg + * `--disable '2.4 2.7'` - disables all actions for version 2.4 and 2.7 + * `PYBUILD_DISABLE_python2=1` - disables all actions for Python 2.X +-* `PYBUILD_DISABLE_python3.3=test` - disables tests for Python 3.3 +-* `PYBUILD_DISABLE=test/python3.3` - same as above ++* `PYBUILD_DISABLE_python3.4=test` - disables tests for Python 3.3 ++* `PYBUILD_DISABLE=test/python3.4` - same as above + * `PYBUILD_DISABLE=configure/python3 2.4 pypy` - disables configure + action for all python3 interpreters, all actions for version 2.4, and + all actions for pypy +Index: b/tests/t304/Makefile +=================================================================== +--- a/tests/t304/Makefile ++++ b/tests/t304/Makefile +@@ -6,10 +6,10 @@ + check: + # python3.2 hardcoded via `dh_python3 --shebang ...python3.2` + grep -q '#! /usr/bin/python3.2 -OO' debian/foo/usr/share/baz32/baz.py +- # python3.3 hardcoded via shebang +- grep -q '/usr/share/foo \-V 3.3' debian/foo/DEBIAN/postinst ++ # python3.4 hardcoded via shebang ++ grep -q '/usr/share/foo \-V 3.4' debian/foo/DEBIAN/postinst + # /env removed from shebang + grep -q '#! /usr/bin/python3' debian/foo/usr/share/bar/bar.py + # /local removed from shebang + grep -q '#! /usr/bin/python3' debian/foo/usr/share/foo/baz.py +- grep -q '#! /usr/bin/python3.3' debian/foo/usr/share/foo/foo.py ++ grep -q '#! /usr/bin/python3.4' debian/foo/usr/share/foo/foo.py +Index: b/tests/t304/foo.py +=================================================================== +--- a/tests/t304/foo.py ++++ b/tests/t304/foo.py +@@ -1,2 +1,2 @@ +-#!/usr/local/bin/python3.3 +-"/usr/local/bin/python3.3 hardcoded in shebang" ++#!/usr/local/bin/python3.4 ++"/usr/local/bin/python3.4 hardcoded in shebang" +Index: b/tests/test_interpreter.py +=================================================================== +--- a/tests/test_interpreter.py ++++ b/tests/test_interpreter.py +@@ -93,26 +93,26 @@ + self.assertIsNone(i.check_extname('foo.abi3.so')) + self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/bazmodule.cpython-32dmu.so') + +- @unittest.skipUnless(exists('/usr/bin/python3.3'), 'python3.3 is not installed') +- def test_python33(self): +- i = Interpreter('python3.3') +- self.assertEqual(i.soabi(), 'cpython-33m') +- self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-33m-MYARCH.so') ++ @unittest.skipUnless(exists('/usr/bin/python3.4'), 'python3.4 is not installed') ++ def test_python34(self): ++ i = Interpreter('python3.4') ++ self.assertEqual(i.soabi(), 'cpython-34m') ++ self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-34m-MYARCH.so') + self.assertIsNone(i.check_extname('foo.cpython-32m.so')) # different version +- self.assertIsNone(i.check_extname('foo.cpython-33m-OTHER.so')) # different architecture +- self.assertEqual(i.check_extname('foo.cpython-33m.so'), r'foo.cpython-33m-MYARCH.so') ++ self.assertIsNone(i.check_extname('foo.cpython-34m-OTHER.so')) # different architecture ++ self.assertEqual(i.check_extname('foo.cpython-34m.so'), r'foo.cpython-34m-MYARCH.so') + self.assertIsNone(i.check_extname('foo.abi3.so')) +- self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-33m-MYARCH.so') ++ self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-34m-MYARCH.so') + +- @unittest.skipUnless(exists('/usr/bin/python3.3-dbg'), 'python3.3-dbg is not installed') +- def test_python33dbg(self): +- i = Interpreter('python3.3-dbg') +- self.assertEqual(i.soabi(), 'cpython-33dm') +- self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-33dm-MYARCH.so') ++ @unittest.skipUnless(exists('/usr/bin/python3.4-dbg'), 'python3.4-dbg is not installed') ++ def test_python34dbg(self): ++ i = Interpreter('python3.4-dbg') ++ self.assertEqual(i.soabi(), 'cpython-34dm') ++ self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-34dm-MYARCH.so') + self.assertIsNone(i.check_extname('foo.cpython-32m.so')) # different version +- self.assertIsNone(i.check_extname('foo.cpython-33m-OTHER.so')) # different architecture ++ self.assertIsNone(i.check_extname('foo.cpython-34m-OTHER.so')) # different architecture + self.assertIsNone(i.check_extname('foo.abi3.so')) +- self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-33dm-MYARCH.so') ++ self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-34dm-MYARCH.so') + + def test_version(self): + i = Interpreter(impl='cpython2') diff -Nru dh-python-1.20140511/debian/patches/py3clean_compat.patch dh-python-1.20140128/debian/patches/py3clean_compat.patch --- dh-python-1.20140511/debian/patches/py3clean_compat.patch 1970-01-01 00:00:00.000000000 +0000 +++ dh-python-1.20140128/debian/patches/py3clean_compat.patch 2014-03-27 20:04:47.000000000 +0000 @@ -0,0 +1,11 @@ +--- a/dhpython/__init__.py ++++ b/dhpython/__init__.py +@@ -98,7 +98,7 @@ if [ "$1" = rtupdate ]; then + fi''', + 'cpython3': ''' + if [ "$1" = rtupdate ]; then +-\tpy3clean {pkg_arg} {dname} ++\tpy3clean {pkg_arg} + \tpy3compile {pkg_arg} {args} {dname} + fi''', + 'pypy': '' diff -Nru dh-python-1.20140511/debian/patches/python3.4.diff dh-python-1.20140128/debian/patches/python3.4.diff --- dh-python-1.20140511/debian/patches/python3.4.diff 1970-01-01 00:00:00.000000000 +0000 +++ dh-python-1.20140128/debian/patches/python3.4.diff 2014-03-27 20:04:47.000000000 +0000 @@ -0,0 +1,35 @@ +Index: b/dhpython/_defaults.py +=================================================================== +--- a/dhpython/_defaults.py ++++ b/dhpython/_defaults.py +@@ -27,11 +27,11 @@ + + SUPPORTED = { + 'cpython2': [(2, 7)], +- 'cpython3': [(3, 3)], ++ 'cpython3': [(3, 4)], + 'pypy': [(2, 0)]} + DEFAULT = { + 'cpython2': (2, 7), +- 'cpython3': (3, 3), ++ 'cpython3': (3, 4), + 'pypy': (2, 0)} + + log = logging.getLogger('dhpython') +Index: b/tests/Makefile +=================================================================== +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -3,9 +3,9 @@ + # hardcode default/supported Python versions to make tests more reliable + # Note that all these packages have to be installed during tests + export DEBPYTHON_DEFAULT=2.7 +-export DEBPYTHON_SUPPORTED=2.6,2.7 +-export DEBPYTHON3_DEFAULT=3.3 +-export DEBPYTHON3_SUPPORTED=3.2,3.3 ++export DEBPYTHON_SUPPORTED=2.7 ++export DEBPYTHON3_DEFAULT=3.4 ++export DEBPYTHON3_SUPPORTED=3.4 + + # enable or disable tests here: + TESTS := test101 test201 test202 test203 test204 test205 test206 test207 test301 test302 test303 test304 diff -Nru dh-python-1.20140511/debian/patches/re-enable_pyshared.patch dh-python-1.20140128/debian/patches/re-enable_pyshared.patch --- dh-python-1.20140511/debian/patches/re-enable_pyshared.patch 2014-07-01 18:41:57.000000000 +0000 +++ dh-python-1.20140128/debian/patches/re-enable_pyshared.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,134 +0,0 @@ -Index: dh-python/dh_python2 -=================================================================== ---- dh-python.orig/dh_python2 -+++ dh-python/dh_python2 -@@ -83,10 +83,10 @@ def share(package, stats, options): - dir2 = interpreter.sitedir(package, version2) - dc = dircmp(dir1, dir2) - share_2x(dir1, dir2, dc) --# elif len(pubvers) == 1: --# move_to_pyshared(interpreter.sitedir(package, pubvers[0])) --# for version in stats['ext_vers']: --# create_ext_links(interpreter.sitedir(package, version)) -+ elif len(pubvers) == 1: -+ move_to_pyshared(interpreter.sitedir(package, pubvers[0])) -+ for version in stats['ext_vers']: -+ create_ext_links(interpreter.sitedir(package, version)) - - if options.guess_versions and pubvers: - for version in get_requested_versions('cpython2', options.vrange): -@@ -113,60 +113,60 @@ def share(package, stats, options): - stats['nsp.txt'] = set(realpath(i) for i in stats['nsp.txt']) - - --# def move_to_pyshared(dir1): --# # dir1 starts with debian/packagename/usr/lib/pythonX.Y/*-packages/ --# debian, package, path = dir1.split('/', 2) --# dstdir = join(debian, package, 'usr/share/pyshared/', --# '/'.join(dir1.split('/')[6:])) --# --# for i in os.listdir(dir1): --# fpath1 = join(dir1, i) --# if isdir(fpath1) and not islink(fpath1): --# if any(fn for fn in os.listdir(fpath1) if fext(fn) != 'so'): --# # at least one file that is not an extension --# move_to_pyshared(join(dir1, i)) --# else: --# if fext(i) == 'so': --# continue --# fpath2 = join(dstdir, i) --# if not exists(fpath2): --# if not exists(dstdir): --# os.makedirs(dstdir) --# if islink(fpath1): --# fpath1_target = os.readlink(fpath1) --# if isabs(fpath1_target): --# os.symlink(fpath1_target, fpath2) --# else: --# fpath1_target = normpath(join(dir1, fpath1_target)) --# relative_symlink(fpath1_target, fpath2) --# os.remove(fpath1) --# else: --# os.rename(fpath1, fpath2) --# relative_symlink(fpath2, fpath1) --# --# --# def create_ext_links(dir1): --# """Create extension symlinks in /usr/lib/pyshared/pythonX.Y. --# --# These symlinks are used to let dpkg detect file conflicts with --# python-support and python-central packages. --# """ --# --# debian, package, path = dir1.split('/', 2) --# python, _, module_subpath = path[8:].split('/', 2) --# dstdir = join(debian, package, 'usr/lib/pyshared/', python, module_subpath) --# --# for i in os.listdir(dir1): --# fpath1 = join(dir1, i) --# if isdir(fpath1): --# create_ext_links(fpath1) --# elif fext(i) == 'so': --# fpath2 = join(dstdir, i) --# if exists(fpath2): --# continue --# if not exists(dstdir): --# os.makedirs(dstdir) --# relative_symlink(fpath1, join(dstdir, i)) -+def move_to_pyshared(dir1): -+ # dir1 starts with debian/packagename/usr/lib/pythonX.Y/*-packages/ -+ debian, package, path = dir1.split('/', 2) -+ dstdir = join(debian, package, 'usr/share/pyshared/', -+ '/'.join(dir1.split('/')[6:])) -+ -+ for i in os.listdir(dir1): -+ fpath1 = join(dir1, i) -+ if isdir(fpath1) and not islink(fpath1): -+ if any(fn for fn in os.listdir(fpath1) if fext(fn) != 'so'): -+ # at least one file that is not an extension -+ move_to_pyshared(join(dir1, i)) -+ else: -+ if fext(i) == 'so': -+ continue -+ fpath2 = join(dstdir, i) -+ if not exists(fpath2): -+ if not exists(dstdir): -+ os.makedirs(dstdir) -+ if islink(fpath1): -+ fpath1_target = os.readlink(fpath1) -+ if isabs(fpath1_target): -+ os.symlink(fpath1_target, fpath2) -+ else: -+ fpath1_target = normpath(join(dir1, fpath1_target)) -+ relative_symlink(fpath1_target, fpath2) -+ os.remove(fpath1) -+ else: -+ os.rename(fpath1, fpath2) -+ relative_symlink(fpath2, fpath1) -+ -+ -+def create_ext_links(dir1): -+ """Create extension symlinks in /usr/lib/pyshared/pythonX.Y. -+ -+ These symlinks are used to let dpkg detect file conflicts with -+ python-support and python-central packages. -+ """ -+ -+ debian, package, path = dir1.split('/', 2) -+ python, _, module_subpath = path[8:].split('/', 2) -+ dstdir = join(debian, package, 'usr/lib/pyshared/', python, module_subpath) -+ -+ for i in os.listdir(dir1): -+ fpath1 = join(dir1, i) -+ if isdir(fpath1): -+ create_ext_links(fpath1) -+ elif fext(i) == 'so': -+ fpath2 = join(dstdir, i) -+ if exists(fpath2): -+ continue -+ if not exists(dstdir): -+ os.makedirs(dstdir) -+ relative_symlink(fpath1, join(dstdir, i)) - - - def create_public_links(dir1, vrange, root=''): diff -Nru dh-python-1.20140511/debian/patches/restore_some_wheezy_pydist_maps.patch dh-python-1.20140128/debian/patches/restore_some_wheezy_pydist_maps.patch --- dh-python-1.20140511/debian/patches/restore_some_wheezy_pydist_maps.patch 2015-08-15 09:18:06.000000000 +0000 +++ dh-python-1.20140128/debian/patches/restore_some_wheezy_pydist_maps.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,158 +0,0 @@ ---- a/pydist/cpython2_fallback -+++ b/pydist/cpython2_fallback -@@ -69,11 +69,13 @@ - Py_ python-py++ - Pymacs pymacs - Pyro4 python2-pyro4 --Pyste libboost-python1.55-dev -+Pygmy pygmy -+Pyste libboost-python1.49-dev - QuantLib_Python quantlib-python - Roadmap_Plugin trac-roadmap - RunSnakeRun runsnakerun - ScientificPython python-scientific -+Shinken shinken-core - Sonata sonata - South python-django-south - TaskCoach taskcoach -@@ -108,13 +110,13 @@ - WordPress_Library python-wordpresslib - X_Tile x-tile - ZODB3 python-zodb --_tifffile python-tifffile -+_tifffile tifffile - adns_python python-adns - alembic alembic - allmydata_tahoe tahoe-lafs - ansible ansible - apache_libcloud python-libcloud --apparmor apparmor-easyprof -+apparmor apparmor-utils - apt_clone apt-clone - aptfs aptfs - aptoncd aptoncd -@@ -154,13 +156,19 @@ - bzr python-bzrlib - bzr_builddeb bzr-builddeb - bzr_cia cia-clients -+bzr_cvsps_import bzr-cvsps-import -+bzr_dbus bzr-dbus - bzr_email bzr-email - bzr_etckeeper etckeeper - bzr_fastimport bzr-fastimport - bzr_git bzr-git -+bzr_grep bzr-grep -+bzr_gtk bzr-gtk -+bzr_rewrite bzr-rewrite - bzr_search bzr-search - bzr_stats bzr-stats - bzr_tweet bzr-tweet -+bzr_svn bzr-svn - bzr_upload bzr-upload - bzr_xmloutput bzr-xmloutput - calypso calypso -@@ -185,6 +193,7 @@ - dblatex dblatex - deluge deluge-common - dh_virtualenv dh-virtualenv -+devscripts devscripts - dicompyler dicompyler - dispcalGUI dispcalgui - dissy dissy -@@ -245,11 +254,13 @@ - gquilt gquilt - graphite_web graphite-web - grokmirror grokmirror -+gozerplugs gozerbot-plugins - gunicorn gunicorn - gvb gvb - gyp gyp - hgnested mercurial-nested - horizon python-django-horizon -+hitchhhiker hitchhiker - httpcode httpcode - httpie httpie - hyde hyde -@@ -312,6 +323,8 @@ - ooo2dbk ooo2dbk - ooolib_python python-ooolib - openbmap_logger openbmap-logger -+openoffice_python python-openoffice -+openstack.common python-openstack-common - osc osc - pYsearch python-yahoo - pam python-pampy -@@ -328,6 +341,7 @@ - preprocess preprocess - presage_dbus_service presage-dbus - prewikka prewikka -+proteus tryton-proteus - ptex2tex ptex2tex - purity_ng purity-ng - pyExcelerator python-excelerator -@@ -377,10 +391,11 @@ - pyneighborhood pyneighborhood - pyp pyp - pyparallel python-parallel -+pyppd pyppd - pyprompter pyprompter - pyqi pyqi - pyremctl python-remctl --pysane python-sane -+pysane python-imaging-sane - pysatellites python-satellites - pyserial python-serial - pysnmp python-pysnmp4 -@@ -395,6 +410,7 @@ - python_libgearman python-gearman.libgearman - python_logging_extra python-loggingx - python_memcached python-memcache -+python_policyd_spf postfix-policyd-spf-python - pytidylib python-tidylib - pytimechart pytimechart - pytz python-tz -@@ -413,6 +429,7 @@ - quodlibet exfalso - rabbitvcs rabbitvcs-core - radiotray radiotray -+ranger ranger - rapid_spring rapid-spring - rdiff_backup rdiff-backup - rebuildd rebuildd -@@ -519,11 +536,15 @@ - turpial turpial - turses turses - typecatcher typecatcher -+txLibravatar python-twisted-libravatar - ubuntu_dev_tools ubuntu-dev-tools - udev_discover udev-discover - unittest_xml_reporting python-xmlrunner - urlscan urlscan -+ufw ufw -+unattended_upgrades unattended-upgrades - vamos undertaker -+vboxapi virtualbox - virtaal virtaal - virtualbricks virtualbricks - virtualenv_clone virtualenv-clone ---- a/pydist/cpython3_fallback -+++ b/pydist/cpython3_fallback -@@ -32,6 +32,7 @@ - py_bcrypt python3-bcrypt - py_postgresql python3-postgresql - pycrypto python3-crypto -+pydns python3-dns - pyenchant python3-enchant - pyepr python3-epr - pyflakes pyflakes ---- a/pydist/generate_fallback_list.py -+++ b/pydist/generate_fallback_list.py -@@ -26,7 +26,7 @@ - from os.path import dirname, exists, isdir, join, split - from urllib.request import urlopen - --SOURCE = 'http://ftp.debian.org/debian/dists/unstable/main/Contents-amd64.gz' -+SOURCE = 'http://ftp.debian.org/debian/dists/wheezy/main/Contents-amd64.gz' - IGNORED_PKGS = {'python-setuptools', 'python3-setuptools', 'pypy-setuptools'} - DEFAULTS = { - 'cpython2': [ diff -Nru dh-python-1.20140511/debian/patches/rmdirs.diff dh-python-1.20140128/debian/patches/rmdirs.diff --- dh-python-1.20140511/debian/patches/rmdirs.diff 1970-01-01 00:00:00.000000000 +0000 +++ dh-python-1.20140128/debian/patches/rmdirs.diff 2014-03-27 20:04:47.000000000 +0000 @@ -0,0 +1,41 @@ +--- a/dhpython/fs.py ++++ b/dhpython/fs.py +@@ -22,7 +22,7 @@ + import os + import re + from filecmp import cmp as cmpfile +-from os.path import exists, isdir, islink, join, split, splitext ++from os.path import exists, dirname, isdir, islink, join, split, splitext + from shutil import rmtree + from stat import ST_MODE, S_IXUSR, S_IXGRP, S_IXOTH + from dhpython import MULTIARCH_DIR_TPL +@@ -47,8 +47,12 @@ + log.debug('moving files from %s to %s', srcdir, dstdir) + share_files(srcdir, dstdir, interpreter, options) + parent_dir = '/'.join(srcdir.split('/')[:-1]) +- if exists(parent_dir) and not os.listdir(parent_dir): +- os.rmdir(parent_dir) ++ while parent_dir: ++ if exists(parent_dir): ++ if os.listdir(parent_dir): ++ break ++ os.rmdir(parent_dir) ++ parent_dir = dirname(parent_dir) + + # do the same with debug locations + dstdir = interpreter.sitedir(package, gdb=True) +@@ -57,8 +61,12 @@ + log.debug('moving files from %s to %s', srcdir, dstdir) + share_files(srcdir, dstdir, interpreter, options) + parent_dir = '/'.join(srcdir.split('/')[:-1]) +- if exists(parent_dir) and not os.listdir(parent_dir): +- os.rmdir(parent_dir) ++ while parent_dir: ++ if exists(parent_dir): ++ if os.listdir(parent_dir): ++ break ++ os.rmdir(parent_dir) ++ parent_dir = dirname(parent_dir) + + + def share_files(srcdir, dstdir, interpreter, options): diff -Nru dh-python-1.20140511/debian/patches/series dh-python-1.20140128/debian/patches/series --- dh-python-1.20140511/debian/patches/series 2014-07-01 18:55:57.000000000 +0000 +++ dh-python-1.20140128/debian/patches/series 2014-03-27 20:04:47.000000000 +0000 @@ -1,6 +1,4 @@ update_default_and_supported_python_versions.patch -disable_ext_renaming_in_dh_python2.patch -disable_multiarch_dependencies.patch -#backports.patch -re-enable_pyshared.patch -restore_some_wheezy_pydist_maps.patch +py3clean_compat.patch +align-12.04-python-versions.patch +rmdirs.diff diff -Nru dh-python-1.20140511/debian/patches/update_default_and_supported_python_versions.patch dh-python-1.20140128/debian/patches/update_default_and_supported_python_versions.patch --- dh-python-1.20140511/debian/patches/update_default_and_supported_python_versions.patch 2014-07-01 18:20:52.000000000 +0000 +++ dh-python-1.20140128/debian/patches/update_default_and_supported_python_versions.patch 2014-03-27 20:04:47.000000000 +0000 @@ -1,22 +1,20 @@ Description: update default/supported Python versions in fallback code Author: Piotr Ozarowski -Index: dh-python/dhpython/_defaults.py -=================================================================== ---- dh-python.orig/dhpython/_defaults.py -+++ dh-python/dhpython/_defaults.py -@@ -26,12 +26,12 @@ from os.path import exists +--- dh-python-1.20130819.orig/dhpython/_defaults.py ++++ dh-python-1.20130819/dhpython/_defaults.py +@@ -25,12 +25,12 @@ from os import environ from subprocess import Popen, PIPE SUPPORTED = { - 'cpython2': [(2, 7)], -- 'cpython3': [(3, 4)], -+ 'cpython2': [(2, 7), (2, 6)], +- 'cpython3': [(3, 3)], ++ 'cpython2': [(2, 7, 2, 6)], + 'cpython3': [(3, 2)], 'pypy': [(2, 0)]} DEFAULT = { 'cpython2': (2, 7), -- 'cpython3': (3, 4), +- 'cpython3': (3, 3), + 'cpython3': (3, 2), 'pypy': (2, 0)} diff -Nru dh-python-1.20140511/debian/postrm dh-python-1.20140128/debian/postrm --- dh-python-1.20140511/debian/postrm 2014-07-01 18:20:13.000000000 +0000 +++ dh-python-1.20140128/debian/postrm 2014-03-27 20:04:47.000000000 +0000 @@ -12,12 +12,10 @@ --divert /usr/share/man/man1/dh_python2.real.1.gz /usr/share/man/man1/dh_python2.1.gz } -if [ abort-upgrade = "$1" ] && dpkg --compare-versions "$2" lt '1.20130819-1~bpo70+1'; then +if [ abort-upgrade = "$1" ] && dpkg --compare-versions "$2" lt '1.20131003-1~cloud0'; then remove_divert elif [ remove = "$1" -o abort-install = "$1" ]; then remove_divert -elif [ upgrade = "$1" ] && echo "$2" | grep -vq '~bpo'; then - remove_divert fi #DEBHELPER# diff -Nru dh-python-1.20140511/debian/preinst dh-python-1.20140128/debian/preinst --- dh-python-1.20140511/debian/preinst 2014-07-01 18:20:13.000000000 +0000 +++ dh-python-1.20140128/debian/preinst 2014-03-27 20:04:47.000000000 +0000 @@ -14,7 +14,7 @@ if [ install = "$1" ]; then divert -elif [ upgrade = "$1" ] && dpkg --compare-versions "$2" lt '1.20130819-1~bpo70+1'; then +elif [ upgrade = "$1" ] && dpkg --compare-versions "$2" lt '1.20131003-1~cloud0'; then divert fi diff -Nru dh-python-1.20140511/dhpython/build/plugin_distutils.py dh-python-1.20140128/dhpython/build/plugin_distutils.py --- dh-python-1.20140511/dhpython/build/plugin_distutils.py 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/dhpython/build/plugin_distutils.py 2014-01-28 17:20:25.000000000 +0000 @@ -84,9 +84,7 @@ for fname in glob1(context['dir'], '*.egg-info'): fpath = join(context['dir'], fname) rmtree(fpath) if isdir(fpath) else remove(fpath) - if exists(args['interpreter'].binary()): - return '{interpreter} {setup_py} clean {args}' - return 0 # no need to invoke anything + return '{interpreter} {setup_py} clean {args}' @shell_command @create_pydistutils_cfg diff -Nru dh-python-1.20140511/dhpython/_defaults.py dh-python-1.20140128/dhpython/_defaults.py --- dh-python-1.20140511/dhpython/_defaults.py 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/dhpython/_defaults.py 2014-01-28 17:20:25.000000000 +0000 @@ -27,11 +27,11 @@ SUPPORTED = { 'cpython2': [(2, 7)], - 'cpython3': [(3, 4)], + 'cpython3': [(3, 3)], 'pypy': [(2, 0)]} DEFAULT = { 'cpython2': (2, 7), - 'cpython3': (3, 4), + 'cpython3': (3, 3), 'pypy': (2, 0)} log = logging.getLogger('dhpython') diff -Nru dh-python-1.20140511/dhpython/fs.py dh-python-1.20140128/dhpython/fs.py --- dh-python-1.20140511/dhpython/fs.py 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/dhpython/fs.py 2014-01-28 17:20:25.000000000 +0000 @@ -22,7 +22,7 @@ import os import re from filecmp import cmp as cmpfile -from os.path import exists, dirname, isdir, islink, join, split, splitext +from os.path import exists, isdir, islink, join, split, splitext from shutil import rmtree from stat import ST_MODE, S_IXUSR, S_IXGRP, S_IXOTH from dhpython import MULTIARCH_DIR_TPL @@ -47,12 +47,8 @@ log.debug('moving files from %s to %s', srcdir, dstdir) share_files(srcdir, dstdir, interpreter, options) parent_dir = '/'.join(srcdir.split('/')[:-1]) - while parent_dir: - if exists(parent_dir): - if os.listdir(parent_dir): - break - os.rmdir(parent_dir) - parent_dir = dirname(parent_dir) + if exists(parent_dir) and not os.listdir(parent_dir): + os.rmdir(parent_dir) # do the same with debug locations dstdir = interpreter.sitedir(package, gdb=True) @@ -61,12 +57,8 @@ log.debug('moving files from %s to %s', srcdir, dstdir) share_files(srcdir, dstdir, interpreter, options) parent_dir = '/'.join(srcdir.split('/')[:-1]) - while parent_dir: - if exists(parent_dir): - if os.listdir(parent_dir): - break - os.rmdir(parent_dir) - parent_dir = dirname(parent_dir) + if exists(parent_dir) and not os.listdir(parent_dir): + os.rmdir(parent_dir) def share_files(srcdir, dstdir, interpreter, options): @@ -83,13 +75,13 @@ new_name = interpreter.check_extname(i, version) if new_name: fpath1 = join(srcdir, new_name) - if exists(fpath1): - log.warn('destination file exist, ' - 'cannot rename %s to %s', fpath1_orig, fpath1) - else: - log.info('renaming %s to %s', fpath1_orig, fpath1) - os.renames(fpath1_orig, fpath1) - i = new_name + if exists(fpath1): + log.warn('destination file exist, ' + 'cannot rename %s to %s', fpath1_orig, fpath1) + else: + log.info('renaming %s to %s', fpath1_orig, fpath1) + os.renames(fpath1_orig, fpath1) + i = new_name fpath2 = join(dstdir, i) if not isdir(fpath1) and not exists(fpath2): # do not rename directories here - all .so files have to be renamed first diff -Nru dh-python-1.20140511/dhpython/interpreter.py dh-python-1.20140128/dhpython/interpreter.py --- dh-python-1.20140511/dhpython/interpreter.py 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/dhpython/interpreter.py 2014-01-28 17:20:25.000000000 +0000 @@ -309,8 +309,8 @@ >>> i = Interpreter('python') >>> i.cache_file('foo.py', Version('3.1')) 'foo.pyc' - >>> i.cache_file('bar/foo.py', '3.4') - 'bar/__pycache__/foo.cpython-34.pyc' + >>> i.cache_file('bar/foo.py', '3.3') + 'bar/__pycache__/foo.cpython-33.pyc' """ version = Version(version or self.version) last_char = 'o' if '-O' in self.options else 'c' @@ -335,8 +335,8 @@ """Return Python magic tag (used in __pycache__ dir to tag files). >>> i = Interpreter('python') - >>> i.magic_tag(version='3.4') - 'cpython-34' + >>> i.magic_tag(version='3.3') + 'cpython-33' """ version = Version(version or self.version) if self.impl.startswith('cpython') and version << Version('3.2'): @@ -378,8 +378,8 @@ >>> Interpreter('python2.7').include_dir '/usr/include/python2.7' - >>> Interpreter('python3.4-dbg').include_dir - '/usr/include/python3.4dm' + >>> Interpreter('python3.3-dbg').include_dir + '/usr/include/python3.3dm' """ if self.impl == 'pypy': return '/usr/lib/pypy/include' @@ -482,7 +482,7 @@ >>> Interpreter('python3.1').suggest_pkg_name('foo') 'python3-foo' - >>> Interpreter('python3.4').suggest_pkg_name('foo') + >>> Interpreter('python3.3').suggest_pkg_name('foo') 'python3-foo' >>> Interpreter('python2.7-dbg').suggest_pkg_name('bar') 'python-bar-dbg' diff -Nru dh-python-1.20140511/dhpython/tools.py dh-python-1.20140128/dhpython/tools.py --- dh-python-1.20140511/dhpython/tools.py 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/dhpython/tools.py 2014-01-28 17:20:25.000000000 +0000 @@ -90,7 +90,7 @@ try: interpreter = Interpreter.from_file(fpath) except Exception as err: - log.debug('fix_shebang (%s): %s', fpath, err) + log.error('fix_shebang (%s): %s', fpath, err) return None if not replacement and interpreter.path != '/usr/bin/': # f.e. /usr/local/* or */bin/env diff -Nru dh-python-1.20140511/dh_python2 dh-python-1.20140128/dh_python2 --- dh-python-1.20140511/dh_python2 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/dh_python2 2014-01-28 17:20:25.000000000 +0000 @@ -83,10 +83,12 @@ dir2 = interpreter.sitedir(package, version2) dc = dircmp(dir1, dir2) share_2x(dir1, dir2, dc) -# elif len(pubvers) == 1: -# move_to_pyshared(interpreter.sitedir(package, pubvers[0])) -# for version in stats['ext_vers']: -# create_ext_links(interpreter.sitedir(package, version)) + elif len(pubvers) == 1: + # TODO: remove this once file conflicts will not be needed anymore + move_to_pyshared(interpreter.sitedir(package, pubvers[0])) + + for version in stats['ext_vers']: + create_ext_links(interpreter.sitedir(package, version)) if options.guess_versions and pubvers: for version in get_requested_versions('cpython2', options.vrange): @@ -113,60 +115,60 @@ stats['nsp.txt'] = set(realpath(i) for i in stats['nsp.txt']) -# def move_to_pyshared(dir1): -# # dir1 starts with debian/packagename/usr/lib/pythonX.Y/*-packages/ -# debian, package, path = dir1.split('/', 2) -# dstdir = join(debian, package, 'usr/share/pyshared/', -# '/'.join(dir1.split('/')[6:])) -# -# for i in os.listdir(dir1): -# fpath1 = join(dir1, i) -# if isdir(fpath1) and not islink(fpath1): -# if any(fn for fn in os.listdir(fpath1) if fext(fn) != 'so'): -# # at least one file that is not an extension -# move_to_pyshared(join(dir1, i)) -# else: -# if fext(i) == 'so': -# continue -# fpath2 = join(dstdir, i) -# if not exists(fpath2): -# if not exists(dstdir): -# os.makedirs(dstdir) -# if islink(fpath1): -# fpath1_target = os.readlink(fpath1) -# if isabs(fpath1_target): -# os.symlink(fpath1_target, fpath2) -# else: -# fpath1_target = normpath(join(dir1, fpath1_target)) -# relative_symlink(fpath1_target, fpath2) -# os.remove(fpath1) -# else: -# os.rename(fpath1, fpath2) -# relative_symlink(fpath2, fpath1) -# -# -# def create_ext_links(dir1): -# """Create extension symlinks in /usr/lib/pyshared/pythonX.Y. -# -# These symlinks are used to let dpkg detect file conflicts with -# python-support and python-central packages. -# """ -# -# debian, package, path = dir1.split('/', 2) -# python, _, module_subpath = path[8:].split('/', 2) -# dstdir = join(debian, package, 'usr/lib/pyshared/', python, module_subpath) -# -# for i in os.listdir(dir1): -# fpath1 = join(dir1, i) -# if isdir(fpath1): -# create_ext_links(fpath1) -# elif fext(i) == 'so': -# fpath2 = join(dstdir, i) -# if exists(fpath2): -# continue -# if not exists(dstdir): -# os.makedirs(dstdir) -# relative_symlink(fpath1, join(dstdir, i)) +def move_to_pyshared(dir1): + # dir1 starts with debian/packagename/usr/lib/pythonX.Y/*-packages/ + debian, package, path = dir1.split('/', 2) + dstdir = join(debian, package, 'usr/share/pyshared/', + '/'.join(dir1.split('/')[6:])) + + for i in os.listdir(dir1): + fpath1 = join(dir1, i) + if isdir(fpath1) and not islink(fpath1): + if any(fn for fn in os.listdir(fpath1) if fext(fn) != 'so'): + # at least one file that is not an extension + move_to_pyshared(join(dir1, i)) + else: + if fext(i) == 'so': + continue + fpath2 = join(dstdir, i) + if not exists(fpath2): + if not exists(dstdir): + os.makedirs(dstdir) + if islink(fpath1): + fpath1_target = os.readlink(fpath1) + if isabs(fpath1_target): + os.symlink(fpath1_target, fpath2) + else: + fpath1_target = normpath(join(dir1, fpath1_target)) + relative_symlink(fpath1_target, fpath2) + os.remove(fpath1) + else: + os.rename(fpath1, fpath2) + relative_symlink(fpath2, fpath1) + + +def create_ext_links(dir1): + """Create extension symlinks in /usr/lib/pyshared/pythonX.Y. + + These symlinks are used to let dpkg detect file conflicts with + python-support and python-central packages. + """ + + debian, package, path = dir1.split('/', 2) + python, _, module_subpath = path[8:].split('/', 2) + dstdir = join(debian, package, 'usr/lib/pyshared/', python, module_subpath) + + for i in os.listdir(dir1): + fpath1 = join(dir1, i) + if isdir(fpath1): + create_ext_links(fpath1) + elif fext(i) == 'so': + fpath2 = join(dstdir, i) + if exists(fpath2): + continue + if not exists(dstdir): + os.makedirs(dstdir) + relative_symlink(fpath1, join(dstdir, i)) def create_public_links(dir1, vrange, root=''): diff -Nru dh-python-1.20140511/pybuild dh-python-1.20140128/pybuild --- dh-python-1.20140511/pybuild 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/pybuild 2014-01-28 17:20:25.000000000 +0000 @@ -237,29 +237,29 @@ step = func.__func__.__name__ if step == 'test' and nocheck: exit(0) - for i in cfg.interpreter: + for interpreter in cfg.interpreter: iversions = versions - if '{version}' not in i and len(versions) > 1: + if '{version}' not in interpreter and len(versions) > 1: log.info('limiting Python versions to %s due to missing {version}' ' in interpreter string', str(versions[0])) iversions = versions[:1] # just the default or closest to default for version in iversions: - if is_disabled(step, i, version): + if is_disabled(step, interpreter, version): continue c = dict(context) - c['dir'] = get_option('dir', i, version, cfg.dir) - c['destdir'] = get_option('destdir', i, version, cfg.destdir) + c['dir'] = get_option('dir', interpreter, version, cfg.dir) + c['destdir'] = get_option('destdir', interpreter, version, cfg.destdir) try: - run(func, i, version, c) + run(func, interpreter, version, c) except Exception as err: log.error('%s: plugin %s failed with: %s', step, plugin.NAME, err, exc_info=cfg.verbose) exit(13) if step == 'install': - ext_destdir = get_option('ext_destdir', i, version) + ext_destdir = get_option('ext_destdir', interpreter, version) if ext_destdir: move_matching_files(c['destdir'], ext_destdir, - get_option('ext_pattern', i, version)) + get_option('ext_pattern', interpreter, version)) exit(0) ### all functions for interpreters in batches mode ### diff -Nru dh-python-1.20140511/pybuild.rst dh-python-1.20140128/pybuild.rst --- dh-python-1.20140511/pybuild.rst 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/pybuild.rst 2014-01-28 17:20:25.000000000 +0000 @@ -201,5 +201,4 @@ ======== * dh_python2(1) * dh_python3(1) -* https://wiki.debian.org/Python/Pybuild * http://deb.li/pybuild - most recent version of this document diff -Nru dh-python-1.20140511/tests/Makefile dh-python-1.20140128/tests/Makefile --- dh-python-1.20140511/tests/Makefile 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/tests/Makefile 2014-01-28 17:20:25.000000000 +0000 @@ -4,8 +4,8 @@ # Note that all these packages have to be installed during tests export DEBPYTHON_DEFAULT=2.7 export DEBPYTHON_SUPPORTED=2.6,2.7 -export DEBPYTHON3_DEFAULT=3.4 -export DEBPYTHON3_SUPPORTED=3.4 +export DEBPYTHON3_DEFAULT=3.3 +export DEBPYTHON3_SUPPORTED=3.2,3.3 # enable or disable tests here: TESTS := test101 test201 test202 test203 test204 test205 test206 test207 test301 test302 test303 test304 diff -Nru dh-python-1.20140511/tests/t202/Makefile dh-python-1.20140128/tests/t202/Makefile --- dh-python-1.20140511/tests/t202/Makefile 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/tests/t202/Makefile 2014-01-28 17:20:25.000000000 +0000 @@ -4,7 +4,7 @@ clean: clean-common check: - test -f debian/python-foo/usr/lib/python2.7/dist-packages/foo.py - test -f debian/python-foo/usr/lib/python2.7/dist-packages/bar/bar.py + test -f debian/python-foo/usr/lib/python2.6/dist-packages/foo.py + test -f debian/python-foo/usr/lib/python2.6/dist-packages/bar/bar.py grep -q pycompile debian/python-foo/DEBIAN/postinst grep -q pyclean debian/python-foo/DEBIAN/prerm diff -Nru dh-python-1.20140511/tests/t204/Makefile dh-python-1.20140128/tests/t204/Makefile --- dh-python-1.20140511/tests/t204/Makefile 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/tests/t204/Makefile 2014-01-28 17:20:25.000000000 +0000 @@ -5,7 +5,7 @@ check: grep -q python2.6 debian/foo/usr/share/foo/foo.py - grep -q Depends:.*python debian/foo/DEBIAN/control + grep -q Depends:.*python2.6 debian/foo/DEBIAN/control #grep -q python2.5 debian/foo/usr/share/bar/bar.py #grep -q Depends:.*python2.5 debian/foo/DEBIAN/control grep -q python2.4 debian/foo/usr/share/foo/baz.py diff -Nru dh-python-1.20140511/tests/t206/Makefile dh-python-1.20140128/tests/t206/Makefile --- dh-python-1.20140511/tests/t206/Makefile 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/tests/t206/Makefile 2014-01-28 17:20:25.000000000 +0000 @@ -13,6 +13,6 @@ grep -q '\-V 2.5 /usr/share/bar25' debian/foo/usr/share/python/runtime.d/foo.rtupdate grep -q '/usr/share/bar25 \-V 2.5' debian/foo/DEBIAN/postinst # python2.6 hardcoded via shebang - #grep -q Depends:.*python2.6 debian/foo/DEBIAN/control + grep -q Depends:.*python2.6 debian/foo/DEBIAN/control grep -q '\-V 2.6 /usr/share/foo' debian/foo/usr/share/python/runtime.d/foo.rtupdate grep -q '/usr/share/foo \-V 2.6' debian/foo/DEBIAN/postinst diff -Nru dh-python-1.20140511/tests/t304/foo.py dh-python-1.20140128/tests/t304/foo.py --- dh-python-1.20140511/tests/t304/foo.py 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/tests/t304/foo.py 2014-01-28 17:20:25.000000000 +0000 @@ -1,2 +1,2 @@ -#!/usr/local/bin/python3.4 -"/usr/local/bin/python3.4 hardcoded in shebang" +#!/usr/local/bin/python3.3 +"/usr/local/bin/python3.3 hardcoded in shebang" diff -Nru dh-python-1.20140511/tests/t304/Makefile dh-python-1.20140128/tests/t304/Makefile --- dh-python-1.20140511/tests/t304/Makefile 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/tests/t304/Makefile 2014-01-28 17:20:25.000000000 +0000 @@ -6,10 +6,10 @@ check: # python3.2 hardcoded via `dh_python3 --shebang ...python3.2` grep -q '#! /usr/bin/python3.2 -OO' debian/foo/usr/share/baz32/baz.py - # python3.4 hardcoded via shebang - grep -q '/usr/share/foo \-V 3.4' debian/foo/DEBIAN/postinst + # python3.3 hardcoded via shebang + grep -q '/usr/share/foo \-V 3.3' debian/foo/DEBIAN/postinst # /env removed from shebang grep -q '#! /usr/bin/python3' debian/foo/usr/share/bar/bar.py # /local removed from shebang grep -q '#! /usr/bin/python3' debian/foo/usr/share/foo/baz.py - grep -q '#! /usr/bin/python3.4' debian/foo/usr/share/foo/foo.py + grep -q '#! /usr/bin/python3.3' debian/foo/usr/share/foo/foo.py diff -Nru dh-python-1.20140511/tests/test_interpreter.py dh-python-1.20140128/tests/test_interpreter.py --- dh-python-1.20140511/tests/test_interpreter.py 2014-05-11 19:00:07.000000000 +0000 +++ dh-python-1.20140128/tests/test_interpreter.py 2014-01-28 17:20:25.000000000 +0000 @@ -93,26 +93,26 @@ self.assertIsNone(i.check_extname('foo.abi3.so')) self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/bazmodule.cpython-32dmu.so') - @unittest.skipUnless(exists('/usr/bin/python3.4'), 'python3.4 is not installed') - def test_python34(self): - i = Interpreter('python3.4') - self.assertEqual(i.soabi(), 'cpython-34m') - self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-34m-MYARCH.so') + @unittest.skipUnless(exists('/usr/bin/python3.3'), 'python3.3 is not installed') + def test_python33(self): + i = Interpreter('python3.3') + self.assertEqual(i.soabi(), 'cpython-33m') + self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-33m-MYARCH.so') self.assertIsNone(i.check_extname('foo.cpython-32m.so')) # different version - self.assertIsNone(i.check_extname('foo.cpython-34m-OTHER.so')) # different architecture - self.assertEqual(i.check_extname('foo.cpython-34m.so'), r'foo.cpython-34m-MYARCH.so') + self.assertIsNone(i.check_extname('foo.cpython-33m-OTHER.so')) # different architecture + self.assertEqual(i.check_extname('foo.cpython-33m.so'), r'foo.cpython-33m-MYARCH.so') self.assertIsNone(i.check_extname('foo.abi3.so')) - self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-34m-MYARCH.so') + self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-33m-MYARCH.so') - @unittest.skipUnless(exists('/usr/bin/python3.4-dbg'), 'python3.4-dbg is not installed') - def test_python34dbg(self): - i = Interpreter('python3.4-dbg') - self.assertEqual(i.soabi(), 'cpython-34dm') - self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-34dm-MYARCH.so') + @unittest.skipUnless(exists('/usr/bin/python3.3-dbg'), 'python3.3-dbg is not installed') + def test_python33dbg(self): + i = Interpreter('python3.3-dbg') + self.assertEqual(i.soabi(), 'cpython-33dm') + self.assertEqual(i.check_extname('foo.so'), r'foo.cpython-33dm-MYARCH.so') self.assertIsNone(i.check_extname('foo.cpython-32m.so')) # different version - self.assertIsNone(i.check_extname('foo.cpython-34m-OTHER.so')) # different architecture + self.assertIsNone(i.check_extname('foo.cpython-33m-OTHER.so')) # different architecture self.assertIsNone(i.check_extname('foo.abi3.so')) - self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-34dm-MYARCH.so') + self.assertEqual(i.check_extname('foo/bar/bazmodule.so'), r'foo/bar/baz.cpython-33dm-MYARCH.so') def test_version(self): i = Interpreter(impl='cpython2')