diff --git a/Makefile b/Makefile
index db6268cebc5e877c3f68fa352f3e87b58fcd70bf..e7f9b63f35ead1a3790487c995b1b7bb7cf1a773 100644
--- a/Makefile
+++ b/Makefile
@@ -4,21 +4,13 @@ PREFIX ?= /usr/local
 MANPAGES ?= dh_python2.1 pycompile.1 pyclean.1
 
 clean:
-	make -C tests clean
-	make -C pydist clean
 	find . -name '*.py[co]' -delete
 	rm -f .coverage
 
 install-dev:
 	$(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)/bin \
-		$(DESTDIR)$(PREFIX)/share/python/runtime.d \
-		$(DESTDIR)$(PREFIX)/share/debhelper/autoscripts/ \
-		$(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/
+		$(DESTDIR)$(PREFIX)/share/python/runtime.d
 	$(INSTALL) -m 755 runtime.d/* $(DESTDIR)$(PREFIX)/share/python/runtime.d/
-	$(INSTALL) -m 644 autoscripts/* $(DESTDIR)$(PREFIX)/share/debhelper/autoscripts/
-	$(INSTALL) -m 755 dh_python2 $(DESTDIR)$(PREFIX)/share/python/
-	$(INSTALL) -m 755 dh_python2.py $(DESTDIR)$(PREFIX)/bin/dh_python2
-	$(INSTALL) -m 644 python2.pm $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/
 
 install-runtime:
 	$(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)/share/python/debpython $(DESTDIR)$(PREFIX)/bin
@@ -28,9 +20,6 @@ install-runtime:
 
 install: install-dev install-runtime
 
-dist_fallback:
-	make -C pydist $@
-
 check_versions:
 	@set -e;\
 	DEFAULT=`sed -rn 's,^DEFAULT = \(([0-9]+)\, ([0-9]+)\),\1.\2,p' debpython/version.py`;\
@@ -49,10 +38,4 @@ pdebuild:
 nose:
 	nosetests --with-doctest --with-coverage
 
-tests: nose
-	make -C tests
-
-test%:
-	make -C tests $@
-
 .PHONY: clean tests test% check_versions
diff --git a/autoscripts/postinst-pycompile b/autoscripts/postinst-pycompile
deleted file mode 100644
index 77f298b2ce712f85f71a1bf0fa6de9bde52975a4..0000000000000000000000000000000000000000
--- a/autoscripts/postinst-pycompile
+++ /dev/null
@@ -1,3 +0,0 @@
-if which pycompile >/dev/null 2>&1; then
-	pycompile -p #PACKAGE# #ARGS#
-fi
diff --git a/autoscripts/preinst-pycentral-clean b/autoscripts/preinst-pycentral-clean
deleted file mode 100644
index 2446a14f39161828b302073c7748208adf21cebe..0000000000000000000000000000000000000000
--- a/autoscripts/preinst-pycentral-clean
+++ /dev/null
@@ -1,6 +0,0 @@
-# make sure python-central files are removed before new package is installed
-if [ "$1" = upgrade ] && [ -f /var/lib/pycentral/#PACKAGE#.pkgremove ]
-then
-	pycentral pkgremove #PACKAGE#
-	rm -f /var/lib/pycentral/#PACKAGE#.pkgremove
-fi
diff --git a/autoscripts/prerm-pyclean b/autoscripts/prerm-pyclean
deleted file mode 100644
index 3ed964e1fc66ebcebdbf81885dfea22728cac159..0000000000000000000000000000000000000000
--- a/autoscripts/prerm-pyclean
+++ /dev/null
@@ -1,8 +0,0 @@
-if which pyclean >/dev/null 2>&1; then
-	pyclean -p #PACKAGE# #ARGS#
-else
-	dpkg -L #PACKAGE# | grep '\.py$' | while read file
-	do
-		rm -f "${file}"[co] >/dev/null
-  	done
-fi
diff --git a/debian/changelog b/debian/changelog
index 02e2531f9b6c8cbcb36477466254165ef2c9b56d..8e912f0979d081ac0e391129f24b1aa1d33bfc04 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-defaults (2.7.17-2) UNRELEASED; urgency=medium
+
+  * Remove deprecated dh_python2. Please add dh-python or
+    dh-sequence-python2 to Build-Depends if your package still supports
+    Python 2.X.
+
+ -- Piotr Ożarowski <piotr@debian.org>  Fri, 08 Nov 2019 14:16:26 +0100
+
 python-defaults (2.7.17-1) unstable; urgency=medium
 
   * Bump version to 2.7.17.
diff --git a/debian/control b/debian/control
index f3399bbb41992aab334b8a5845dbab6300f47a5f..6da47e8b506f3622eb069c562b05632aee87d642 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@ Pre-Depends: python-minimal (= ${binary:Version})
 Depends: ${misc:Depends}, python2.7 (>= 2.7.17~rc1-1~), libpython-stdlib (= ${binary:Version}), python2 (= ${binary:Version})
 Suggests: python-doc (= ${binary:Version}), python-tk (>= 2.7.17~rc1-1~)
 Conflicts: python-central (<< 0.5.5)
-Breaks: update-manager-core (<< 0.200.5-2)
+Breaks: update-manager-core (<< 0.200.5-2), dh-python (<< 4.20191109)
 Replaces: python-dev (<< 2.6.5-2)
 Provides: python-email, python-ctypes, python-wsgiref, python-importlib, python-profiler
 Description: interactive high-level object-oriented language (Python2 version)
diff --git a/debian/control.in b/debian/control.in
index 03d84bf3ddfb32e10da09451c40a8ed406494027..50f7e815682f07f7703e45a53a7bd1dd9ebf947b 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -20,7 +20,7 @@ Pre-Depends: python-minimal (= ${binary:Version})
 Depends: ${misc:Depends}, @PVER@ (>= @PREVVER@), libpython-stdlib (= ${binary:Version}), python2 (= ${binary:Version})
 Suggests: python-doc (= ${binary:Version}), python-tk (>= @PREVVER@)
 Conflicts: python-central (<< 0.5.5)
-Breaks: update-manager-core (<< 0.200.5-2)
+Breaks: update-manager-core (<< 0.200.5-2), dh-python (<< 4.20191109)
 Replaces: python-dev (<< 2.6.5-2)
 Provides: python-email, python-ctypes, python-wsgiref, python-importlib, python-profiler
 Description: interactive high-level object-oriented language (Python2 version)
diff --git a/debian/python2.install b/debian/python2.install
deleted file mode 100644
index 14077b9f7fa846d4693906ef60cf580f73f5baa1..0000000000000000000000000000000000000000
--- a/debian/python2.install
+++ /dev/null
@@ -1 +0,0 @@
-pydist/dist_fallback /usr/share/python/
diff --git a/debian/python2.manpages b/debian/python2.manpages
deleted file mode 100644
index 47df0aaaa6de7ed6d7d79af6c31e985436b240cd..0000000000000000000000000000000000000000
--- a/debian/python2.manpages
+++ /dev/null
@@ -1 +0,0 @@
-dh_python2.1
diff --git a/debian/rules b/debian/rules
index fc2f5af40b79b975704db821976e21aba2cf3059..6a5651baf99dfd7c314b0865f44129f4f5d24bc4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -75,16 +75,6 @@ endif
 	  && rm -f debian/control.tmp && exit 0; \
 	  mv debian/control.tmp debian/control
 
-MANPAGES ?= dh_python2.1 pycompile.1 pyclean.1
-
-%.1: %.rst
-	rst2man $< > $@
-
-# Manually run this rule if there is a need to update the dh_python2 man pages
-make-man: $(MANPAGES)
-	cd pydist && \
-	rst2html README.PyDist > README.PyDist.html
-
 clean: control-file
 	dh_testdir
 	dh_testroot
@@ -116,7 +106,7 @@ stamp-control:
 	    fi; \
 	done
 
-install: build stamp-dh_python stamp-install
+install: build stamp-install
 stamp-install: stamp-build control-file stamp-control
 	dh_testdir
 	dh_testroot
@@ -125,18 +115,6 @@ stamp-install: stamp-build control-file stamp-control
 
 	touch stamp-install
 
-stamp-dh_python:
-	dh_testdir
-	dh_testroot
-	dh_installdirs
-	-make check_versions
-	DESTDIR=debian/python2 PREFIX=/usr make install-dev
-	DESTDIR=debian/python2-minimal PREFIX=/usr make install-runtime
-	# disabled by default, run manually if you want to update it
-	# (requires apt-file and network connection)
-	#make -C pydist dist_fallback
-	touch $@
-
 # Build architecture-independent files here.
 binary-indep: build install
 	dh_testdir -i
diff --git a/debpython/debhelper.py b/debpython/debhelper.py
deleted file mode 100644
index 2b6b29936319d99b0141bfc60ccb4f473d6f648e..0000000000000000000000000000000000000000
--- a/debpython/debhelper.py
+++ /dev/null
@@ -1,210 +0,0 @@
-# -*- coding: UTF-8 -*-
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-import logging
-from os import makedirs, chmod
-from os.path import exists, join, dirname
-
-log = logging.getLogger(__name__)
-
-
-class DebHelper(object):
-    """Reinvents the wheel / some dh functionality (Perl is ugly ;-P)"""
-
-    def __init__(self, options):
-        self.options = options
-        self.packages = {}
-        self.python_version = None
-        source_section = True
-        binary_package = None
-
-        pkgs = options.package
-        skip_pkgs = options.no_package
-
-        try:
-            fp = open('debian/control', 'r')
-        except IOError:
-            raise Exception('cannot find debian/control file')
-
-        xspv = xpv = False
-        for line in fp:
-            if not line.strip():
-                source_section = False
-                binary_package = None
-                continue
-            if binary_package:
-                if binary_package.startswith('python3'):
-                    continue
-                if pkgs and binary_package not in pkgs:
-                    continue
-                if skip_pkgs and binary_package in skip_pkgs:
-                    continue
-                if line.startswith('Architecture:'):
-                    arch = line[13:].strip()
-                    # TODO: if arch doesn't match current architecture:
-                    #del self.packages[binary_package]
-                    self.packages[binary_package]['arch'] = arch
-                    continue
-            elif line.startswith('Package:'):
-                binary_package = line[8:].strip()
-                if binary_package.startswith('python3'):
-                    log.debug('skipping Python 3.X package: %s', binary_package)
-                    continue
-                if pkgs and binary_package not in pkgs:
-                    continue
-                if skip_pkgs and binary_package in skip_pkgs:
-                    continue
-                self.packages[binary_package] = {'substvars': {},
-                                                 'autoscripts': {},
-                                                 'rtupdates': [],
-                                                 'arch': 'any'}
-            elif line.startswith('Source:'):
-                self.source_name = line[7:].strip()
-            elif source_section:
-                if line.lower().startswith('xs-python-version:'):
-                    xspv = True
-                    if not self.python_version:
-                        self.python_version = line[18:].strip()
-                if line.lower().startswith('x-python-version:'):
-                    xpv = True
-                    self.python_version = line[17:].strip()
-
-        if xspv and xpv:
-            log.error('Please remove XS-Python-Version from debian/control')
-
-        log.debug('source=%s, binary packages=%s', self.source_name, \
-                                                   self.packages.keys())
-
-    def addsubstvar(self, package, name, value):
-        """debhelper's addsubstvar"""
-        self.packages[package]['substvars'].setdefault(name, []).append(value)
-
-    def autoscript(self, package, when, template, args):
-        """debhelper's autoscript"""
-        self.packages[package]['autoscripts'].setdefault(when, {})\
-                            .setdefault(template, []).append(args)
-
-    def add_rtupdate(self, package, value):
-        self.packages[package]['rtupdates'].append(value)
-
-    def save_autoscripts(self):
-        for package, settings in self.packages.iteritems():
-            autoscripts = settings.get('autoscripts')
-            if not autoscripts:
-                continue
-
-            for when, templates in autoscripts.iteritems():
-                fn = "debian/%s.%s.debhelper" % (package, when)
-                if exists(fn):
-                    data = open(fn, 'r').read()
-                else:
-                    data = ''
-
-                new_data = ''
-                for tpl_name, args in templates.iteritems():
-                    for i in args:
-                        # try local one first (useful while testing dh_python2)
-                        fpath = join(dirname(__file__), '..',
-                                     "autoscripts/%s" % tpl_name)
-                        if not exists(fpath):
-                            fpath = "/usr/share/debhelper/autoscripts/%s" % tpl_name
-                        tpl = open(fpath, 'r').read()
-                        if self.options.compile_all and args:
-                            # TODO: should args be checked to contain dir name?
-                            tpl = tpl.replace('#PACKAGE#', '')
-                        else:
-                            tpl = tpl.replace('#PACKAGE#', package)
-                        tpl = tpl.replace('#ARGS#', i)
-                        if tpl not in data and tpl not in new_data:
-                            new_data += "\n%s" % tpl
-                if new_data:
-                    data += "\n# Automatically added by dh_python2:" +\
-                            "%s\n# End automatically added section\n" % new_data
-                    fp = open(fn, 'w')
-                    fp.write(data)
-                    fp.close()
-
-    def save_substvars(self):
-        for package, settings in self.packages.iteritems():
-            substvars = settings.get('substvars')
-            if not substvars:
-                continue
-            fn = "debian/%s.substvars" % package
-            if exists(fn):
-                data = open(fn, 'r').read()
-            else:
-                data = ''
-            for name, values in substvars.iteritems():
-                p = data.find("%s=" % name)
-                if p > -1:  # parse the line and remove it from data
-                    e = data[p:].find('\n')
-                    line = data[p + len("%s=" % name):\
-                                p + e if e > -1 else None]
-                    items = [i.strip() for i in line.split(',') if i]
-                    if e > -1 and data[p + e:].strip():
-                        data = "%s\n%s" % (data[:p], data[p + e:])
-                    else:
-                        data = data[:p]
-                else:
-                    items = []
-                for j in values:
-                    if j not in items:
-                        items.append(j)
-                if items:
-                    if data:
-                        data += '\n'
-                    data += "%s=%s\n" % (name, ', '.join(items))
-            data = data.replace('\n\n', '\n')
-            if data:
-                fp = open(fn, 'w')
-                fp.write(data)
-                fp.close()
-
-    def save_rtupdate(self):
-        for package, settings in self.packages.iteritems():
-            pkg_arg = '' if self.options.compile_all else "-p %s" % package
-            values = settings.get('rtupdates')
-            if not values:
-                continue
-            d = "debian/%s/usr/share/python/runtime.d" % package
-            if not exists(d):
-                makedirs(d)
-            fn = "%s/%s.rtupdate" % (d, package)
-            if exists(fn):
-                data = open(fn, 'r').read()
-            else:
-                data = "#! /bin/sh\nset -e"
-            for dname, args in values:
-                cmd = 'if [ "$1" = rtupdate ]; then' +\
-                      "\n\tpyclean %s %s" % (pkg_arg, dname) +\
-                      "\n\tpycompile %s %s %s\nfi" % (pkg_arg, args, dname)
-                if cmd not in data:
-                    data += "\n%s" % cmd
-            if data:
-                fp = open(fn, 'w')
-                fp.write(data)
-                fp.close()
-                chmod(fn, 0755)
-
-    def save(self):
-        self.save_substvars()
-        self.save_autoscripts()
-        self.save_rtupdate()
diff --git a/debpython/depends.py b/debpython/depends.py
deleted file mode 100644
index be153b06a381dc77156533aee7f161cc558bad79..0000000000000000000000000000000000000000
--- a/debpython/depends.py
+++ /dev/null
@@ -1,176 +0,0 @@
-# -*- coding: UTF-8 -*-
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-import logging
-from debpython.pydist import parse_pydep, guess_dependency
-from debpython.version import DEFAULT, SUPPORTED, debsorted, vrepr, vrange_str
-
-# minimum version required for pycompile/pyclean
-MINPYCDEP = 'python:any (>= 2.6.6-7~)'
-
-log = logging.getLogger(__name__)
-
-
-class Dependencies(object):
-    """Store relations (dependencies, etc.) between packages."""
-
-    def __init__(self, package):
-        self.package = package
-        self.depends = []
-        self.recommends = []
-        self.suggests = []
-        self.enhances = []
-        self.breaks = []
-        self.rtscripts = []
-
-    def export_to(self, dh):
-        """Fill in debhelper's substvars."""
-        for i in sorted(self.depends):
-            dh.addsubstvar(self.package, 'python:Depends', i)
-        for i in sorted(self.recommends):
-            dh.addsubstvar(self.package, 'python:Recommends', i)
-        for i in sorted(self.suggests):
-            dh.addsubstvar(self.package, 'python:Suggests', i)
-        for i in sorted(self.enhances):
-            dh.addsubstvar(self.package, 'python:Enhances', i)
-        for i in sorted(self.breaks):
-            dh.addsubstvar(self.package, 'python:Breaks', i)
-        for i in self.rtscripts:
-            dh.add_rtupdate(self.package, i)
-
-    def __str__(self):
-        return "D=%s; R=%s; S=%s; E=%s, B=%s; RT=%s" % (self.depends, \
-                self.recommends, self.suggests, self.enhances, \
-                self.breaks, self.rtscripts)
-
-    def depend(self, value):
-        if value and value not in self.depends:
-            self.depends.append(value)
-
-    def recommend(self, value):
-        if value and value not in self.recommends:
-            self.recommends.append(value)
-
-    def suggest(self, value):
-        if value and value not in self.suggests:
-            self.suggests.append(value)
-
-    def enhance(self, value):
-        if value and value not in self.enhances:
-            self.enhances.append(value)
-
-    def break_(self, value):
-        if value and value not in self.breaks:
-            self.breaks.append(value)
-
-    def rtscript(self, value):
-        if value not in self.rtscripts:
-            self.rtscripts.append(value)
-
-    def parse(self, stats, options):
-        log.debug('generating dependencies for package %s', self.package)
-
-        pub_vers = sorted(stats['public_vers'].union(stats['ext']))
-        if pub_vers:
-            dbgpkg = self.package.endswith('-dbg')
-            tpl = 'python-dbg' if dbgpkg else 'python'
-            minv = pub_vers[0]
-            maxv = pub_vers[-1]
-            # generating "python2.X | python2.Y | python2.Z" dependencies
-            # disabled (see #625740):
-            #if dbgpkg:
-            #    tpl2 = 'python%d.%d-dbg'
-            #else:
-            #    tpl2 = 'python%d.%d'
-            #self.depend(' | '.join(tpl2 % i for i in debsorted(pub_vers)))
-
-            # additional Depends to block python package transitions
-            if minv <= DEFAULT:
-                self.depend("%s (>= %d.%d)" % \
-                            (tpl, minv[0], minv[1]))
-            if maxv >= DEFAULT:
-                self.depend("%s (<< %d.%d)" % \
-                            (tpl, maxv[0], maxv[1] + 1))
-
-        # make sure pycompile binary is available
-        if stats['compile']:
-            self.depend(MINPYCDEP)
-
-        for interpreter, version in stats['shebangs']:
-            self.depend("%s:any" % interpreter)
-
-        for private_dir, details in stats['private_dirs'].iteritems():
-            versions = list(v for i, v in details.get('shebangs', []) if v)
-
-            for v in versions:
-                if v in SUPPORTED:
-                    self.depend("python%d.%d:any" % v)
-                else:
-                    log.info('dependency on python%s (from shebang) ignored'
-                             ' - it\'s not supported anymore', vrepr(v))
-            # /usr/bin/python shebang → add python to Depends
-            if any(True for i, v in details.get('shebangs', []) if v is None):
-                self.depend('python:any')
-
-            if details.get('compile', False):
-                self.depend(MINPYCDEP)
-                args = ''
-                vr = options.vrange
-                if len(versions) == 1:  # only one version from shebang
-                    args += "-V %s" % vrepr(versions[0])
-                elif vr:
-                    # if there are no hardcoded versions in shebang or there
-                    # are scripts for different Python versions: compile with
-                    # default Python version (or the one requested via X-P-V)
-                    args += "-V %s" % vrange_str(vr)
-                    if vr == (None, None):
-                        pass
-                    elif vr[0] == vr[1]:
-                        self.depend("python%s:any" % vrepr(vr[0]))
-                    else:
-                        if vr[0]:  # minimum version specified
-                            self.depend("python:any (>= %s)" % vrepr(vr[0]))
-                        if vr[1]:  # maximum version specified
-                            self.depend("python:any (<< %d.%d)" % \
-                                       (vr[1][0], vr[1][1] + 1))
-
-                for pattern in options.regexpr or []:
-                    args += " -X '%s'" % pattern.replace("'", r"'\''")
-                self.rtscript((private_dir, args))
-
-        if options.guess_deps:
-            for fn in stats['requires.txt']:
-                # TODO: should options.recommends and options.suggests be
-                # removed from requires.txt?
-                for i in parse_pydep(fn):
-                    self.depend(i)
-
-        # add dependencies from --depends
-        for item in options.depends or []:
-            self.depend(guess_dependency(item))
-        # add dependencies from --recommends
-        for item in options.recommends or []:
-            self.recommend(guess_dependency(item))
-        # add dependencies from --suggests
-        for item in options.suggests or []:
-            self.suggest(guess_dependency(item))
-
-        log.debug(self)
diff --git a/debpython/files.py b/debpython/files.py
index 69129258d1c97372c4362200d920e71252582ba5..45b6ac6f47c4c75fc8ab5c4b3a34562bcf384f50 100644
--- a/debpython/files.py
+++ b/debpython/files.py
@@ -1,5 +1,5 @@
 # -*- coding: UTF-8 -*-
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
+# Copyright © 2010-2019 Piotr Ożarowski <piotr@debian.org>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
diff --git a/debpython/namespace.py b/debpython/namespace.py
index 769eddec08488fb607284aa3ad3d9d2bbee8739e..236d42b6cf4795e574b0973abf18c8cd643561b1 100644
--- a/debpython/namespace.py
+++ b/debpython/namespace.py
@@ -1,5 +1,5 @@
 # -*- coding: UTF-8 -*-
-# Copyright © 2011-2012 Piotr Ożarowski <piotr@debian.org>
+# Copyright © 2011-2019 Piotr Ożarowski <piotr@debian.org>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -25,8 +25,7 @@ from os import environ, listdir, remove, rmdir
 from os.path import dirname, exists, join, getsize, split
 from subprocess import Popen, PIPE
 
-from debpython.pydist import PUBLIC_DIR_RE
-from debpython.tools import memoize, sitedir
+from debpython.tools import memoize, sitedir, PUBLIC_DIR_RE
 
 log = logging.getLogger(__name__)
 
@@ -122,41 +121,3 @@ def add_namespace_files(files, package=None, action=None):
                 log.debug(e)
             else:
                 yield fpath
-
-
-def remove_from_package(package, namespaces, versions):
-    """Remove empty __init__.py files for requested namespaces."""
-    if not isinstance(namespaces, set):
-        namespaces = set(namespaces)
-    keep = set()
-    for ns in namespaces:
-        for version in versions:
-            fpath = join(sitedir(version, package), *ns.split('.'))
-            fpath = join(fpath, '__init__.py')
-            if not exists(fpath):
-                continue
-            if getsize(fpath) != 0:
-                log.warning('file not empty, cannot share %s namespace', ns)
-                keep.add(ns)
-                break
-
-    # return a set of namespaces that should be handled by pycompile/pyclean
-    result = namespaces - keep
-
-    # remove empty __init__.py files, if available
-    for ns in result:
-        for version in versions:
-            dpath = join(sitedir(version, package), *ns.split('.'))
-            fpath = join(dpath, '__init__.py')
-            if exists(fpath):
-                remove(fpath)
-                if not listdir(dpath):
-                    rmdir(dpath)
-        # clean pyshared dir as well
-        dpath = join('debian', package, 'usr/share/pyshared', *ns.split('.'))
-        fpath = join(dpath, '__init__.py')
-        if exists(fpath):
-            remove(fpath)
-            if not listdir(dpath):
-                rmdir(dpath)
-    return result
diff --git a/debpython/option.py b/debpython/option.py
index ce8242aed8022f837425d7ae85082ef56f96edf2..eee49115e29cf3389dc3d0d99eed4b587b617068 100644
--- a/debpython/option.py
+++ b/debpython/option.py
@@ -1,5 +1,5 @@
 # -*- coding: UTF-8 -*-
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
+# Copyright © 2010-2019 Piotr Ożarowski <piotr@debian.org>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
diff --git a/debpython/pydist.py b/debpython/pydist.py
deleted file mode 100644
index 4c039aae4b8ad790aa3ed6bab7c506c0833bb618..0000000000000000000000000000000000000000
--- a/debpython/pydist.py
+++ /dev/null
@@ -1,285 +0,0 @@
-# -*- coding: UTF-8 -*-
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-from __future__ import with_statement
-import logging
-import os
-import re
-from os.path import exists, isdir, join
-from string import maketrans
-from subprocess import PIPE, Popen
-from debpython.version import vrepr, getver, get_requested_versions
-from debpython.tools import memoize
-
-log = logging.getLogger(__name__)
-
-PUBLIC_DIR_RE = re.compile(r'.*?/usr/lib/python(\d.\d+)/(site|dist)-packages')
-PYDIST_RE = re.compile(r"""
-    (?P<name>[A-Za-z][A-Za-z0-9_.\-]*)             # Python distribution name
-    \s*
-    (?P<vrange>(?:-?\d\.\d+(?:-(?:\d\.\d+)?)?)?) # version range
-    \s*
-    (?P<dependency>(?:[a-z][^;]*)?)              # Debian dependency
-    (?:  # optional upstream version -> Debian version translator
-        ;\s*
-        (?P<standard>PEP386)?                    # PEP-386 mode
-        \s*
-        (?P<rules>(?:s|tr|y).*)?                 # translator rules
-    )?
-    """, re.VERBOSE)
-REQUIRES_RE = re.compile(r'''
-    (?P<name>[A-Za-z][A-Za-z0-9_.]*)     # Python distribution name
-    \s*
-    (?P<enabled_extras>(?:\[[^\]]*\])?)  # ignored for now
-    \s*
-    (?:  # optional minimum/maximum version
-        (?P<operator><=?|>=?|==|!=)
-        \s*
-        (?P<version>(\w|[-.])+)
-    )?
-    ''', re.VERBOSE)
-
-
-def validate(fpath):
-    """Check if pydist file looks good."""
-    with open(fpath) as fp:
-        for line in fp:
-            line = line.strip('\r\n')
-            if line.startswith('#') or not line:
-                continue
-            if not PYDIST_RE.match(line):
-                log.error('invalid pydist data in file %s: %s', \
-                          fpath.rsplit('/', 1)[-1], line)
-                return False
-    return True
-
-
-@memoize
-def load(dname='/usr/share/python/dist/', fname='debian/pydist-overrides',
-         fbname='/usr/share/python/dist_fallback'):
-    """Load iformation about installed Python distributions."""
-    if exists(fname):
-        to_check = [fname]  # first one!
-    else:
-        to_check = []
-    if isdir(dname):
-        to_check.extend(join(dname, i) for i in os.listdir(dname))
-    if exists(fbname):  # fall back generated at python-defaults build time
-        to_check.append(fbname)  # last one!
-
-    result = {}
-    for fpath in to_check:
-        with open(fpath) as fp:
-            for line in fp:
-                line = line.strip('\r\n')
-                if line.startswith('#') or not line:
-                    continue
-                dist = PYDIST_RE.search(line)
-                if not dist:
-                    raise Exception('invalid pydist line: %s (in %s)' % (line, fpath))
-                dist = dist.groupdict()
-                name = safe_name(dist['name'])
-                dist['versions'] = get_requested_versions(dist['vrange'])
-                dist['dependency'] = dist['dependency'].strip()
-                if dist['rules']:
-                    dist['rules'] = dist['rules'].split(';')
-                else:
-                    dist['rules'] = []
-                result.setdefault(name, []).append(dist)
-    return result
-
-
-def guess_dependency(req, version=None):
-    log.debug('trying to guess dependency for %s (python=%s)',
-              req, vrepr(version) if version else None)
-    if isinstance(version, basestring):
-        version = getver(version)
-
-    # some upstreams have weird ideas for distribution name...
-    name, rest = re.compile('([^!><= \[]+)(.*)').match(req).groups()
-    req = safe_name(name) + rest
-
-    data = load()
-    req_d = REQUIRES_RE.match(req)
-    if not req_d:
-        log.info('please ask dh_python2 author to fix REQUIRES_RE '
-                 'or your upstream author to fix requires.txt')
-        raise Exception('requirement is not valid: %s' % req)
-    req_d = req_d.groupdict()
-    name = req_d['name']
-    details = data.get(name.lower())
-    if details:
-        for item in details:
-            if version and version not in item.get('versions', version):
-                # rule doesn't match version, try next one
-                continue
-
-            if not item['dependency']:
-                return  # this requirement should be ignored
-            if item['dependency'].endswith(')'):
-                # no need to translate versions if version is hardcoded in
-                # Debian dependency
-                return item['dependency']
-            if req_d['version'] and (item['standard'] or item['rules']) and\
-               req_d['operator'] not in (None, '=='):
-                v = _translate(req_d['version'], item['rules'], item['standard'])
-                return "%s (%s %s)" % (item['dependency'], req_d['operator'], v)
-            else:
-                return item['dependency']
-
-    # try dpkg -S
-    query = "'*/%s-?*\.egg-info'" % ci_regexp(safe_name(name))  # TODO: .dist-info
-    if version:
-        query = "%s | grep '/python%s/\|/pyshared/'" % \
-                (query, vrepr(version))
-    else:
-        query = "%s | grep '/python2\../\|/pyshared/'" % query
-
-    log.debug("invoking dpkg -S %s", query)
-    process = Popen("/usr/bin/dpkg -S %s" % query, \
-                    shell=True, stdout=PIPE, stderr=PIPE)
-    stdout, stderr = process.communicate()
-    if process.returncode == 0:
-        result = set()
-        for line in stdout.split('\n'):
-            if not line.strip():
-                continue
-            result.add(line.split(':')[0])
-        if len(result) > 1:
-            log.error('more than one package name found for %s dist', name)
-        else:
-            return result.pop()
-    else:
-        log.debug('dpkg -S did not find package for %s: %s', name, stderr)
-
-    # fall back to python-distname
-    pname = sensible_pname(name)
-    log.info('Cannot find installed package that provides %s. '
-             'Using %s as package name. Please add "%s correct_package_name" '
-             'line to debian/pydist-overrides to override it if this is incorrect.',
-             name, pname, safe_name(name))
-    return pname
-
-
-def parse_pydep(fname):
-    public_dir = PUBLIC_DIR_RE.match(fname)
-    if public_dir:
-        ver = public_dir.group(1)
-    else:
-        ver = None
-
-    result = []
-    modified = optional_section = False
-    processed = []
-    with open(fname, 'r') as fp:
-        lines = [i.strip() for i in fp.readlines()]
-        for line in lines:
-            if not line or line.startswith('#'):
-                processed.append(line)
-                continue
-            if line.startswith('['):
-                optional_section = True
-            if optional_section:
-                processed.append(line)
-                continue
-            dependency = guess_dependency(line, ver)
-            if dependency:
-                result.append(dependency)
-                if 'setuptools' in line.lower():
-                    # TODO: or dependency in recommends\
-                    # or dependency in suggests
-                    modified = True
-                else:
-                    processed.append(line)
-            else:
-                processed.append(line)
-    if modified:
-        with open(fname, 'w') as fp:
-            fp.writelines(i + '\n' for i in processed)
-    return result
-
-
-def safe_name(name):
-    """Emulate distribute's safe_name."""
-    return re.compile('[^A-Za-z0-9.]+').sub('_', name).lower()
-
-
-def sensible_pname(egg_name):
-    """Guess Debian package name from Egg name."""
-    egg_name = safe_name(egg_name).replace('_', '-')
-    if egg_name.startswith('python-'):
-        egg_name = egg_name[7:]
-    return "python-%s" % egg_name.lower()
-
-
-def ci_regexp(name):
-    """Return case insensitive dpkg -S regexp."""
-    return ''.join("[%s%s]" % (i.upper(), i) if i.isalpha() else i for i in name.lower())
-
-
-PRE_VER_RE = re.compile(r'[-.]?(alpha|beta|rc|dev|a|b|c)')
-GROUP_RE = re.compile(r'\$(\d+)')
-
-
-def _pl2py(pattern):
-    """Convert Perl RE patterns used in uscan to Python's
-
-    >>> print _pl2py('foo$3')
-    foo\g<3>
-    """
-    return GROUP_RE.sub(r'\\g<\1>', pattern)
-
-
-def _translate(version, rules, standard):
-    """Translate Python version into Debian one.
-
-    >>> _translate('1.C2betac', ['s/c//gi'], None)
-    '1.2beta'
-    >>> _translate('5-fooa1.2beta3-fooD',
-    ...     ['s/^/1:/', 's/-foo//g', 's:([A-Z]):+$1:'], 'PEP386')
-    '1:5~a1.2~beta3+D'
-    >>> _translate('x.y.x.z', ['tr/xy/ab/', 'y,z,Z,'], None)
-    'a.b.a.Z'
-    """
-    for rule in rules:
-        # uscan supports s, tr and y operations
-        if rule.startswith(('tr', 'y')):
-            # Note: no support for escaped separator in the pattern
-            pos = 1 if rule.startswith('y') else 2
-            tmp = rule[pos + 1:].split(rule[pos])
-            version = version.translate(maketrans(tmp[0], tmp[1]))
-        elif rule.startswith('s'):
-            # uscan supports: g, u and x flags
-            tmp = rule[2:].split(rule[1])
-            pattern = re.compile(tmp[0])
-            count = 1
-            if tmp[2:]:
-                flags = tmp[2]
-                if 'g' in flags:
-                    count = 0
-                if 'i' in flags:
-                    pattern = re.compile(tmp[0], re.I)
-            version = pattern.sub(_pl2py(tmp[1]), version, count)
-        else:
-            log.warn('unknown rule ignored: %s', rule)
-    if standard == 'PEP386':
-        version = PRE_VER_RE.sub('~\g<1>', version)
-    return version
diff --git a/debpython/tools.py b/debpython/tools.py
index bab780f6243dc7ddadb005e0bc16382fa268a0be..85c62b98a50e4bdcbec1436b4123f7531bad1174 100644
--- a/debpython/tools.py
+++ b/debpython/tools.py
@@ -1,5 +1,5 @@
 # -*- coding: UTF-8 -*-
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
+# Copyright © 2010-2019 Piotr Ożarowski <piotr@debian.org>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -19,35 +19,10 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.
 
-from __future__ import with_statement
-import codecs
-import logging
-import os
 import re
 from cPickle import dumps
-from glob import glob
-from os.path import exists, isdir, join, split
-from shutil import rmtree
-from subprocess import PIPE, Popen
-from debpython.version import RANGE_PATTERN, getver, get_requested_versions
 
-log = logging.getLogger(__name__)
-EGGnPTH_RE = re.compile(r'(.*?)(-py\d\.\d(?:-[^.]*)?)?(\.egg-info|\.pth)$')
-SHEBANG_RE = re.compile(r'^#!\s*(.*?/bin/.*?)(python(2\.\d+)?(?:-dbg)?)(?:\s(.*))?[$\r\n].*')
-SHAREDLIB_RE = re.compile(r'NEEDED.*libpython(\d\.\d)')
-INSTALL_RE = re.compile(r"""
-    (?P<pattern>.+?)  # file pattern
-    (?:\s+  # optional Python module name:
-    (?P<module>[A-Za-z][A-Za-z0-9_.]*)?
-    )?
-    \s*  # optional version range:
-    (?P<vrange>%s)?$
-""" % RANGE_PATTERN, re.VERBOSE)
-REMOVE_RE = re.compile(r"""
-    (?P<pattern>.+?)  # file pattern
-    \s*  # optional version range:
-    (?P<vrange>%s)?$
-""" % RANGE_PATTERN, re.VERBOSE)
+PUBLIC_DIR_RE = re.compile(r'.*?/usr/lib/python(\d.\d+)/(site|dist)-packages')
 
 
 def sitedir(version, package=None, gdb=False):
@@ -74,109 +49,6 @@ def sitedir(version, package=None, gdb=False):
     return path
 
 
-def relpath(target, link):
-    """Return relative path.
-
-    >>> relpath('/usr/share/python-foo/foo.py', '/usr/bin/foo', )
-    '../share/python-foo/foo.py'
-    """
-    t = target.split('/')
-    l = link.split('/')
-    while l[0] == t[0]:
-        del l[0], t[0]
-    return '/'.join(['..'] * (len(l) - 1) + t)
-
-
-def relative_symlink(target, link):
-    """Create relative symlink."""
-    return os.symlink(relpath(target, link), link)
-
-
-def fix_shebang(fpath, replacement=None):
-    """Normalize file's shebang.
-
-    :param replacement: new shebang command (path to interpreter and options)
-    """
-    try:
-        with open(fpath) as fp:
-            fcontent = fp.readlines()
-        if not fcontent:
-            log.debug('fix_shebang: ignoring empty file: %s', fpath)
-            return None
-    except IOError:
-        log.error('cannot open %s', fpath)
-        return False
-
-    match = SHEBANG_RE.match(fcontent[0])
-    if not match:
-        return None
-    if not replacement:
-        path, interpreter, version, argv = match.groups()
-        if path != '/usr/bin':  # f.e. /usr/local/* or */bin/env
-            replacement = "/usr/bin/%s" % interpreter
-        if interpreter == 'python2':
-            replacement = '/usr/bin/python'
-        if replacement and argv:
-            replacement += " %s" % argv
-    if replacement:
-        log.info('replacing shebang in %s (%s)', fpath, fcontent[0])
-        # do not catch IOError here, the file is zeroed at this stage so it's
-        # better to fail dh_python2
-        with open(fpath, 'w') as fp:
-            fp.write("#! %s\n" % replacement)
-            fp.writelines(fcontent[1:])
-    return True
-
-
-def shebang2pyver(fpath):
-    """Check file's shebang.
-
-    :rtype: tuple
-    :returns: pair of Python interpreter string and Python version
-    """
-    try:
-        with open(fpath) as fp:
-            data = fp.read(32)
-            match = SHEBANG_RE.match(data)
-            if not match:
-                return None
-            res = match.groups()
-            if res[1:3] != (None, None):
-                if res[2]:
-                    return res[1], getver(res[2])
-                return res[1], None
-    except IOError:
-        log.error('cannot open %s', fpath)
-
-
-def so2pyver(fpath):
-    """Return libpython version file is linked to or None.
-
-    :rtype: tuple
-    :returns: Python version
-    """
-
-    cmd = "readelf -Wd '%s'" % fpath
-    process = Popen(cmd, stdout=PIPE, shell=True)
-    match = SHAREDLIB_RE.search(process.stdout.read())
-    if match:
-        return getver(match.groups()[0])
-
-
-def clean_egg_name(name):
-    """Remove Python version and platform name from Egg files/dirs.
-
-    >>> clean_egg_name('python_pipeline-0.1.3_py3k-py3.1.egg-info')
-    'python_pipeline-0.1.3_py3k.egg-info'
-    >>> clean_egg_name('Foo-1.2-py2.7-linux-x86_64.egg-info')
-    'Foo-1.2.egg-info'
-    """
-    match = EGGnPTH_RE.match(name)
-    if match and match.group(2) is not None:
-        return ''.join(match.group(1, 3))
-    return name
-
-
 class memoize(object):
     def __init__(self, func):
         self.func = func
@@ -187,111 +59,3 @@ class memoize(object):
         if key not in self.cache:
             self.cache[key] = self.func(*args, **kwargs)
         return self.cache[key]
-
-
-def pyinstall(package, vrange):
-    """Install local files listed in pkg.pyinstall files as public modules."""
-    status = True
-    srcfpath = "./debian/%s.pyinstall" % package
-    if not exists(srcfpath):
-        return status
-    versions = get_requested_versions(vrange)
-
-    for line in codecs.open(srcfpath, encoding='utf-8'):
-        if not line or line.startswith('#'):
-            continue
-        details = INSTALL_RE.match(line)
-        if not details:
-            status = False
-            log.warn('%s.pyinstall: unrecognized line: %s',
-                     package, line)
-            continue
-        details = details.groupdict()
-        if details['module']:
-            details['module'] = details['module'].replace('.', '/')
-        myvers = versions & get_requested_versions(details['vrange'])
-        if not myvers:
-            log.debug('%s.pyinstall: no matching versions for line %s',
-                      package, line)
-            continue
-        files = glob(details['pattern'])
-        if not files:
-            status = False
-            log.error('%s.pyinstall: file not found: %s',
-                      package, details['pattern'])
-            continue
-        for fpath in files:
-            fpath = fpath.lstrip('/.')
-            if details['module']:
-                dstname = join(details['module'], split(fpath)[1])
-            elif fpath.startswith('debian/'):
-                dstname = fpath[7:]
-            else:
-                dstname = fpath
-            for version in myvers:
-                dstfpath = join(sitedir(version, package), dstname)
-                dstdir = split(dstfpath)[0]
-                if not exists(dstdir):
-                    try:
-                        os.makedirs(dstdir)
-                    except Exception:
-                        log.error('cannot create %s directory', dstdir)
-                        return False
-                if exists(dstfpath):
-                    try:
-                        os.remove(dstfpath)
-                    except Exception:
-                        status = False
-                        log.error('cannot replace %s file', dstfpath)
-                        continue
-                try:
-                    os.link(fpath, dstfpath)
-                except Exception:
-                    status = False
-                    log.error('cannot copy %s file to %s', fpath, dstdir)
-    return status
-
-
-def pyremove(package, vrange):
-    """Remove public modules listed in pkg.pyremove file."""
-    status = True
-    srcfpath = "./debian/%s.pyremove" % package
-    if not exists(srcfpath):
-        return status
-    versions = get_requested_versions(vrange)
-
-    for line in codecs.open(srcfpath, encoding='utf-8'):
-        if not line or line.startswith('#'):
-            continue
-        details = REMOVE_RE.match(line)
-        if not details:
-            status = False
-            log.warn('%s.pyremove: unrecognized line: %s',
-                     package, line)
-            continue
-        details = details.groupdict()
-        myvers = versions & get_requested_versions(details['vrange'])
-        if not myvers:
-            log.debug('%s.pyremove: no matching versions for line %s',
-                      package, line)
-            continue
-        for version in myvers:
-            files = glob(sitedir(version, package) + details['pattern'])
-            if not files:
-                log.debug('%s.pyremove: nothing to remove: python%d.%d, %s',
-                          package, version, details['pattern'])
-                continue
-            for fpath in files:
-                if isdir(fpath):
-                    try:
-                        rmtree(fpath)
-                    except Exception, e:
-                        status = False
-                        log.error(e)
-                else:
-                    try:
-                        os.remove(fpath)
-                    except (IOError, OSError), e:
-                        status = False
-                        log.error(e)
-    return status
diff --git a/debpython/version.py b/debpython/version.py
index f94ebeeaa9d8df9220ee45f437dbd754ba325039..8d4d73abd9831f4f8f4d870692b7ad13a433f746 100644
--- a/debpython/version.py
+++ b/debpython/version.py
@@ -1,5 +1,5 @@
 # -*- coding: UTF-8 -*-
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
+# Copyright © 2010-2019 Piotr Ożarowski <piotr@debian.org>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -23,7 +23,7 @@ import logging
 import re
 from ConfigParser import SafeConfigParser
 from os import environ
-from os.path import exists, dirname, join
+from os.path import exists
 from types import GeneratorType
 
 # will be overriden via debian_defaults file few lines later
@@ -53,7 +53,7 @@ except Exception:
     log.exception('cannot read debian_defaults')
 try:
     SUPPORTED = tuple(tuple(int(j) for j in i.strip().split('.'))
-                            for i in _supported.split(','))
+                      for i in _supported.split(','))
 except Exception:
     log.exception('cannot read debian_defaults')
 
@@ -142,102 +142,6 @@ def parse_vrange(value):
     return minv, maxv
 
 
-def parse_pycentral_vrange(value):
-    """Parse XS-Python-Version.
-
-    >>> parse_pycentral_vrange('current') == (DEFAULT, DEFAULT)
-    True
-    >>> parse_pycentral_vrange('all')
-    (None, None)
-    >>> parse_pycentral_vrange('all, >= 2.4')
-    ((2, 4), None)
-    >>> parse_pycentral_vrange('all, << 3.0')
-    (None, (3, 0))
-    >>> parse_pycentral_vrange('2.6')
-    ((2, 6), (2, 6))
-    >>> parse_pycentral_vrange('2.5, 2.6')
-    ((2, 5), None)
-    >>> parse_pycentral_vrange('>= 2.6.3')
-    ((2, 6), None)
-    """
-    get = lambda x: get_requested_versions(parse_vrange(x))
-
-    current = False
-    minv = maxv = None
-    hardcoded = set()
-
-    for item in value.split(','):
-        item = item.strip()
-
-        if item == 'all':
-            continue
-        elif item == 'current':
-            current = True
-            continue
-
-        match = re.match('>=\s*([\d\.]+)', item)
-        if match:
-            minv = "%.3s" % match.group(1)
-            continue
-        match = re.match('<<\s*([\d\.]+)', item)
-        if match:
-            maxv = "%.3s" % match.group(1)
-            continue
-        match = re.match('^[\d\.]+$', item)
-        if match:
-            hardcoded.add("%.3s" % match.group(0))
-
-    if len(hardcoded) == 1:
-        ver = hardcoded.pop()
-        return getver(ver), getver(ver)
-
-    if not minv and hardcoded:
-        # yeah, no maxv!
-        minv = sorted(hardcoded)[0]
-
-    if current:
-        versions = sorted(get("%s-%s" % (minv if minv else '',
-                                         maxv if maxv else '')))
-        if not versions:
-            raise ValueError("version range doesn't match installed Python versions: %s" % value)
-        # not really what "current" means...
-        if DEFAULT in versions:
-            return DEFAULT, DEFAULT
-        else:
-            return versions[0], versions[0]
-    return getver(minv) if minv else None, \
-           getver(maxv) if maxv else None
-
-
-def vrange_str(vrange):
-    """Return version range string from given range.
-
-    >>> vrange_str(((2, 4), None))
-    '2.4-'
-    >>> vrange_str(((2, 4), (2, 6)))
-    '2.4-2.6'
-    >>> vrange_str(((2, 4), (3, 0)))
-    '2.4-3.0'
-    >>> vrange_str((None, (2, 7)))
-    '-2.7'
-    >>> vrange_str(((2, 5), (2, 5)))
-    '2.5'
-    >>> vrange_str((None, None))
-    '-'
-    """
-    if vrange[0] is vrange[1] is None:
-        return '-'
-    if vrange[0] == vrange[1]:
-        return '.'.join(str(i) for i in vrange[0])
-    elif vrange[0] is None:
-        return '-' + '.'.join(str(i) for i in vrange[1])
-    elif vrange[1] is None:
-        return '.'.join(str(i) for i in vrange[0]) + '-'
-    else:
-        return "%s-%s" % ('.'.join(str(i) for i in vrange[0]),
-                          '.'.join(str(i) for i in vrange[1]))
-
-
 def vrepr(value):
     """
     >>> vrepr(([2, 7], [3, 2]))
@@ -252,7 +156,7 @@ def vrepr(value):
     if isinstance(value, basestring):
         return value
     elif not isinstance(value, (GeneratorType, set))\
-      and isinstance(value[0], int):
+            and isinstance(value[0], int):
         return '.'.join(str(i) for i in value)
 
     result = []
diff --git a/dh_python2 b/dh_python2
deleted file mode 100755
index 326190f9011c448bca22483d10cbf3f8cc8aa3ed..0000000000000000000000000000000000000000
--- a/dh_python2
+++ /dev/null
@@ -1,713 +0,0 @@
-#! /usr/bin/python2
-# -*- coding: UTF-8 -*- vim: et ts=4 sw=4
-
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-from __future__ import with_statement
-import logging
-import os
-import re
-import sys
-from filecmp import dircmp, cmpfiles, cmp as fcmp
-from optparse import OptionParser, SUPPRESS_HELP
-from os.path import isabs, isdir, islink, exists, join, normpath, realpath,\
- split
-from shutil import rmtree, copy as fcopy
-from stat import ST_MODE, S_IXUSR, S_IXGRP, S_IXOTH
-from debpython.debhelper import DebHelper
-from debpython.depends import Dependencies
-from debpython.version import SUPPORTED, DEFAULT, \
-    debsorted, getver, vrepr, parse_pycentral_vrange, \
-    get_requested_versions, parse_vrange, vrange_str
-import debpython.namespace as ns
-from debpython.pydist import validate as validate_pydist, \
-                             PUBLIC_DIR_RE
-from debpython.tools import sitedir, relative_symlink, \
-                            fix_shebang, shebang2pyver, \
-                            so2pyver, clean_egg_name, \
-                            pyinstall, pyremove
-from debpython.option import Option
-
-# initialize script
-logging.basicConfig(format='%(levelname).1s: %(module)s:%(lineno)d: '
-                           '%(message)s')
-log = logging.getLogger(__name__)
-os.umask(022)
-EGGnPTH_RE = re.compile(r'(.*?)(-py\d\.\d+)?(.*?)(\.egg-info|\.pth)$')
-
-# naming conventions used in the file:
-# * version - tuple of integers
-# * ver - string representation of version
-# * vrange - version range, pair of max and min versions
-# * fn - file name (without path)
-# * fpath - file path
-
-
-### FILES ######################################################
-def fix_locations(package):
-    """Move files to the right location."""
-    found_versions = {}
-    for version in SUPPORTED:
-        ver = vrepr(version)
-        to_check = [i % ver for i in (\
-                    'usr/local/lib/python%s/site-packages',
-                    'usr/local/lib/python%s/dist-packages',
-                    'var/lib/python-support/python%s',
-                    'usr/lib/pymodules/python%s')]
-        if version >= (2, 6):
-            to_check.append("usr/lib/python%s/site-packages" % ver)
-        dstdir = sitedir(version, package)
-
-        for location in to_check:
-            srcdir = "debian/%s/%s" % (package, location)
-            if isdir(srcdir):
-                if ver in found_versions:
-                    log.error('files for version %s '
-                              'found in two locations:\n %s\n %s',
-                              ver, location, found_versions[ver])
-                    exit(2)
-                log.info('Python %s should install files in %s. '
-                         'Did you forget "--install-layout=deb"?',
-                         ver, sitedir(version))
-                if not isdir(dstdir):
-                    os.makedirs(dstdir)
-                # TODO: what about relative symlinks?
-                log.debug('moving files from %s to %s', srcdir, dstdir)
-                os.renames(srcdir, dstdir)
-                found_versions[ver] = location
-
-        # do the same with debug locations
-        dbg_to_check = ['usr/lib/debug/%s' % i for i in to_check]
-        dbg_to_check.append("usr/lib/debug/usr/lib/pyshared/python%s" % ver)
-        dstdir = sitedir(version, package, gdb=True)
-
-        for location in dbg_to_check:
-            srcdir = "debian/%s/%s" % (package, location)
-            if isdir(srcdir):
-                if not isdir(dstdir):
-                    os.makedirs(dstdir)
-                log.debug('moving files from %s to %s', srcdir, dstdir)
-                os.renames(srcdir, dstdir)
-
-
-### SHARING FILES ##############################################
-def share(package, stats, options):
-    """Move files to /usr/share/pyshared/ if possible."""
-    if package.endswith('-dbg'):
-        # nothing to share in debug packages
-        return
-    pubvers = debsorted(i for i in stats['public_vers'] if i[0] == 2)
-    if len(pubvers) > 1:
-        for pos, version1 in enumerate(pubvers):
-            dir1 = sitedir(version1, package)
-            for version2 in pubvers[pos + 1:]:
-                dir2 = sitedir(version2, package)
-                dc = dircmp(dir1, dir2)
-                share_2x(dir1, dir2, dc)
-    elif len(pubvers) == 1:
-        # don't install into pyshared anymore
-        pass
-
-    if options.guess_versions and pubvers:
-        for version in get_requested_versions(options.vrange):
-            if version not in pubvers:
-                log.debug('guessing files for Python %s', vrepr(version))
-                versions_without_ext = debsorted(set(pubvers) -\
-                                                 stats['ext'])
-                if not versions_without_ext:
-                    log.error('extension for python%s is missing. '
-                              'Build extensions for all supported Python '
-                              'versions (`pyversions -vr`) or adjust '
-                              'X-Python-Version field or pass '
-                              '--no-guessing-versions to dh_python2',
-                              vrepr(version))
-                    exit(3)
-                srcver = versions_without_ext[0]
-                if srcver in stats['public_vers']:
-                    stats['public_vers'].add(version)
-                share_2x(sitedir(srcver, package), sitedir(version, package))
-    # remove duplicates
-    stats['requires.txt'] = set(realpath(i) for i in stats['requires.txt'])
-    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:]))
-
-    fext = lambda fname: fname.rsplit('.', 1)[-1]
-
-    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 i.rsplit('.', 1)[-1] == '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=''):
-    """Create public module symlinks for given directory."""
-
-    debian, package, path = dir1.split('/', 2)
-    versions = get_requested_versions(vrange)
-
-    for fn in os.listdir(dir1):
-        fpath1 = join(dir1, fn)
-        if isdir(fpath1):
-            create_public_links(fpath1, vrange, join(root, fn))
-        else:
-            for version in versions:
-                dstdir = join(sitedir(version, package), root)
-                if not exists(dstdir):
-                    os.makedirs(dstdir)
-                relative_symlink(fpath1, join(dstdir, fn))
-
-
-def share_2x(dir1, dir2, dc=None):
-    """Move common files to pyshared and create symlinks in original
-    locations."""
-    debian, package, path = dir2.split('/', 2)
-    # dir1 starts with debian/packagename/usr/lib/pythonX.Y/*-packages/
-    dstdir = join(debian, package, 'usr/share/pyshared/', \
-                  '/'.join(dir1.split('/')[6:]))
-    if not exists(dstdir) and not islink(dir1):
-        os.makedirs(dstdir)
-    if dc is None:  # guess/copy mode
-        if not exists(dir2):
-            os.makedirs(dir2)
-        common_dirs = []
-        common_files = []
-        for i in os.listdir(dir1):
-            subdir1 = join(dir1, i)
-            if isdir(subdir1) and not islink(subdir1):
-                common_dirs.append([i, None])
-            else:
-                # directories with .so files will be blocked earlier
-                common_files.append(i)
-    elif islink(dir1):
-        # skip this symlink in pyshared
-        # (dpkg has problems with symlinks anyway)
-        common_dirs = []
-        common_files = []
-    else:
-        common_dirs = dc.subdirs.iteritems()
-        common_files = dc.common_files
-        # dircmp returns common names only, lets check files more carefully...
-        common_files = cmpfiles(dir1, dir2, common_files, shallow=False)[0]
-
-    for fn in common_files:
-        if 'so' in fn.split('.'):  # foo.so, bar.so.0.1.2, etc.
-            # in unlikely case where extensions are exactly the same
-            continue
-        fpath1 = join(dir1, fn)
-        fpath2 = join(dir2, fn)
-        fpath3 = join(dstdir, fn)
-        # do not touch symlinks created by previous loop or other tools
-        if dc and not islink(fpath1):
-            # replace with a link to pyshared
-            if not exists(fpath3):
-                os.rename(fpath1, fpath3)
-                relative_symlink(fpath3, fpath1)
-            elif fcmp(fpath3, fpath1, shallow=False):
-                os.remove(fpath1)
-                relative_symlink(fpath3, fpath1)
-        if dc is None:  # guess/copy mode
-            if islink(fpath1):
-                # ralative links will work as well, it's always the same level
-                os.symlink(os.readlink(fpath1), fpath2)
-            else:
-                if exists(fpath3):
-                    # cannot share it, pyshared contains another copy
-                    fcopy(fpath1, fpath2)
-                else:
-                    # replace with a link to pyshared
-                    os.rename(fpath1, fpath3)
-                    relative_symlink(fpath3, fpath1)
-                    relative_symlink(fpath3, fpath2)
-        elif exists(fpath2) and exists(fpath3) and \
-             fcmp(fpath2, fpath3, shallow=False):
-            os.remove(fpath2)
-            relative_symlink(fpath3, fpath2)
-    for dn, dc in common_dirs:
-        share_2x(join(dir1, dn), join(dir2, dn), dc)
-
-
-### PACKAGE DETAILS ############################################
-def scan(package, dname=None, options=None):
-    """Gather statistics about Python files in given package."""
-    r = {'requires.txt': set(),
-         'nsp.txt': set(),
-         'shebangs': set(),
-         'public_vers': set(),
-         'private_dirs': {},
-         'compile': False,
-         'ext': set()}
-
-    dbg_package = package.endswith('-dbg')
-
-    if not dname:
-        proot = "debian/%s" % package
-        if dname is False:
-            private_to_check = []
-        else:
-            private_to_check = [i % package for i in
-                                ('usr/lib/%s', 'usr/lib/games/%s',
-                                'usr/share/%s', 'usr/share/games/%s')]
-    else:
-        # scan private directory *only*
-        dname = dname.strip('/')
-        proot = join('debian', package, dname)
-        private_to_check = [dname]
-
-    for root, dirs, file_names in os.walk(proot):
-        # ignore Python 3.X locations
-        if '/usr/lib/python3' in root or\
-           '/usr/local/lib/python3' in root:
-            # warn only once
-            if root[root.find('/lib/python'):].count('/') == 2:
-                log.warning('Python 3.x location detected, '
-                            'please use dh_python3: %s', root)
-            continue
-
-        bin_dir = private_dir = None
-        public_dir = PUBLIC_DIR_RE.match(root)
-        if public_dir:
-            version = getver(public_dir.group(1))
-            if root.endswith('-packages'):
-                r['public_vers'].add(version)
-        else:
-            # TODO: find a way to specify Python version private
-            # extension was build for
-            version = False
-            for i in private_to_check:
-                if root.startswith(join('debian', package, i)):
-                    private_dir = '/' + i
-                    break
-            else:  # i.e. not public_dir and not private_dir
-                if len(root.split('/', 6)) < 6 and (\
-                   root.endswith('/sbin') or root.endswith('/bin') or\
-                   root.endswith('/usr/games')):
-                   # /(s)bin or /usr/(s)bin or /usr/games
-                    bin_dir = root
-
-        # handle some EGG related data (.egg-info dirs)
-        for name in dirs:
-            if name.endswith('.egg-info'):
-                if dbg_package and options.clean_dbg_pkg:
-                    rmtree(join(root, name))
-                    dirs.remove(name)
-                    continue
-                clean_name = clean_egg_name(name)
-                if clean_name != name:
-                    log.info('renaming %s to %s', name, clean_name)
-                    os.rename(join(root, name), join(root, clean_name))
-                    dirs[dirs.index(name)] = clean_name
-        if root.endswith('.egg-info'):
-            if 'requires.txt' in file_names:
-                r['requires.txt'].add(join(root, 'requires.txt'))
-            if 'namespace_packages.txt' in file_names:
-                r['nsp.txt'].add(join(root, 'namespace_packages.txt'))
-            continue
-
-        # check files
-        for fn in sorted(file_names):
-            # sorted() to make sure .so files are handled before .so.foo
-            fpath = join(root, fn)
-            if not exists(fpath):
-                # could be removed while handling .so symlinks
-                if islink(fpath) and '.so.' in split(fpath)[-1]:
-                    # dangling symlink to (now removed/renamed) .so file
-                    # which wasn't removed yet (see test3's quux.so.0)
-                    log.info('removing symlink: %s', fpath)
-                    os.remove(fpath)
-                continue
-            fext = fn.rsplit('.', 1)[-1]
-            if fext in ('pyc', 'pyo'):
-                os.remove(fpath)
-                continue
-            if public_dir:
-                if fext == 'so' and islink(fpath):
-                    dstfpath = fpath
-                    links = set()
-                    while islink(dstfpath):
-                        links.add(dstfpath)
-                        dstfpath = join(root, os.readlink(dstfpath))
-                    if exists(dstfpath) and '.so.' in split(dstfpath)[-1]:
-                        # rename .so.$FOO symlinks, remove other ones
-                        for lpath in links:
-                            log.info('removing symlink: %s', lpath)
-                            os.remove(lpath)
-                        log.info('renaming %s to %s', dstfpath, fn)
-                        os.rename(dstfpath, fpath)
-                if dbg_package and options.clean_dbg_pkg and \
-                   fext not in ('so', 'h'):
-                    os.remove(join(root, fn))
-                    continue
-
-            elif private_dir:
-                if exists(fpath):
-                    mode = os.stat(fpath)[ST_MODE]
-                    if mode & S_IXUSR or mode & S_IXGRP or mode & S_IXOTH:
-                        if (options.no_shebang_rewrite or \
-                            fix_shebang(fpath, options.shebang)) and \
-                           not options.ignore_shebangs:
-                            res = shebang2pyver(fpath)
-                            if res:
-                                r['private_dirs'].setdefault(private_dir, {})\
-                                    .setdefault('shebangs', set()).add(res)
-
-            if public_dir or private_dir:
-                if fext == 'so':
-                    so_version = so2pyver(join(root, fn))
-                    if so_version:
-                        if public_dir:
-                            if version != so_version:
-                                log.error('extension linked to libpython%s '
-                                          'and shipped in python%s\'s dist-'
-                                          'packages: %s', vrepr(so_version),
-                                          vrepr(version), fn)
-                                exit(7)
-                            log.warn('public extension linked with '
-                                     'libpython%s: %s', vrepr(so_version), fn)
-                        elif not version:
-                            version = so_version
-
-                    (r if public_dir else
-                     r['private_dirs'].setdefault(private_dir, {}))\
-                    .setdefault('ext', set()).add(version)
-                    continue
-                elif fext == 'py':
-                    (r if public_dir else
-                     r['private_dirs'].setdefault(private_dir, {}))\
-                    ['compile'] = True
-                    continue
-
-            # .egg-info files
-            if fn.endswith('.egg-info'):
-                clean_name = clean_egg_name(fn)
-                if clean_name != fn:
-                    log.info('renaming %s to %s', fn, clean_name)
-                    os.rename(join(root, fn), join(root, clean_name))
-                continue
-            # search for scripts in bin dirs
-            if bin_dir:
-                if (options.no_shebang_rewrite or \
-                    fix_shebang(fpath, options.shebang)) and \
-                   not options.ignore_shebangs:
-                     res = shebang2pyver(fpath)
-                     if res:
-                         r['shebangs'].add(res)
-
-    if dbg_package and options.clean_dbg_pkg:
-        # remove empty directories in -dbg packages
-        proot = proot + '/usr/lib'
-        for root, dirs, file_names in os.walk(proot, topdown=False):
-            if '-packages/' in root and not file_names:
-                try:
-                    os.rmdir(root)
-                except Exception:
-                    pass
-
-    log.debug("package %s details = %s", package, r)
-    return r
-
-
-################################################################
-def main():
-    log.warn('Please add dh-python package to Build-Depends')
-    usage = '%prog -p PACKAGE [-V [X.Y][-][A.B]] DIR [-X REGEXPR]\n'
-    parser = OptionParser(usage, version='%prog 2.1',
-                                   option_class=Option)
-    parser.add_option('--no-guessing-versions', action='store_false',
-        dest='guess_versions', default=True,
-        help='disable guessing other supported Python versions')
-    parser.add_option('--no-guessing-deps', action='store_false',
-        dest='guess_deps', default=True, help='disable guessing dependencies')
-    parser.add_option('--skip-private', action='store_true', default=False,
-        help='don\'t check private directories')
-    parser.add_option('-v', '--verbose', action='store_true', default=False,
-        help='turn verbose mode on')
-    # arch=False->arch:all only, arch=True->arch:any only, None->all of them
-    parser.add_option('-i', '--indep', action='store_false',
-        dest='arch', default=None,
-        help='act on architecture independent packages')
-    parser.add_option('-a', '-s', '--arch', action='store_true',
-        dest='arch', help='act on architecture dependent packages')
-    parser.add_option('-q', '--quiet', action='store_false', dest='verbose',
-        help='be quiet')
-    parser.add_option('-p', '--package', action='append',
-        help='act on the package named PACKAGE')
-    parser.add_option('-N', '--no-package', action='append',
-        help='do not act on the specified package')
-    parser.add_option('--compile-all', action='store_true', default=False,
-        help='compile all files from given private directory in postinst, '
-             'not just the ones provided by the package')
-    parser.add_option('-V', type='version_range', dest='vrange',
-        help='specify list of supported Python versions. ' +\
-             'See pycompile(1) for examples')
-    parser.add_option('-X', '--exclude', action='append', dest='regexpr',
-        help='exclude items that match given REGEXPR. You may use this option '
-             'multiple times to build up a list of things to exclude.')
-    parser.add_option('--depends', action='append',
-        help='translate given requirements into Debian dependencies '
-             'and add them to ${python:Depends}. '
-             'Use it for missing items in requires.txt.')
-    parser.add_option('--recommends', action='append',
-        help='translate given requirements into Debian '
-             'dependencies and add them to ${python:Recommends}')
-    parser.add_option('--suggests', action='append',
-        help='translate given requirements into Debian '
-             'dependencies and add them to ${python:Suggests}')
-    parser.add_option('--namespace', action='append', dest='namespaces',
-        help='recreate __init__.py files for given namespaces at install time')
-    parser.add_option('--clean-pycentral', action='store_true', default=False,
-        help='generate maintainer script that will remove pycentral files')
-    parser.add_option('--shebang',
-        help='use given command as shebang in scripts')
-    parser.add_option('--ignore-shebangs', action='store_true', default=False,
-        help='do not translate shebangs into Debian dependencies')
-    parser.add_option('--ignore-namespace', action='store_true', default=False,
-        help="ignore Egg's namespace_packages.txt file and --namespace option")
-    parser.add_option('--no-dbg-cleaning', action='store_false',
-            dest='clean_dbg_pkg', default=True,
-        help='do not remove files from debug packages')
-    parser.add_option('--no-shebang-rewrite', action='store_true',
-            default=False, help='do not rewrite shebangs')
-    # ignore some debhelper options:
-    parser.add_option('-O', help=SUPPRESS_HELP)
-
-    options, args = parser.parse_args(sys.argv[1:] + \
-                    os.environ.get('DH_OPTIONS', '').split())
-    # regexpr option type is not used so lets check patterns here
-    for pattern in options.regexpr or []:
-        # fail now rather than at runtime
-        try:
-            pattern = re.compile(pattern)
-        except Exception:
-            log.error('regular expression is not valid: %s', pattern)
-            exit(1)
-
-    if not options.vrange and exists('debian/pyversions'):
-        log.debug('parsing version range from debian/pyversions')
-        with open('debian/pyversions') as fp:
-            for line in fp:
-                line = line.strip()
-                if line and not line.startswith('#'):
-                    options.vrange = parse_vrange(line)
-                    break
-
-    # disable PyDist if dh_pydeb is used
-    if options.guess_deps:
-        try:
-            rules = open('debian/rules', 'r').read()
-        except IOError:
-            log.warning('cannot open debian/rules file')
-        else:
-            if re.search('\n\s*dh_pydeb', rules) or \
-               re.search('\n\s*dh\s+[^#]*--with[^#]+pydeb', rules):
-                log.warning('dh_pydeb detected, PyDist feature disabled')
-                options.guess_deps = False
-
-    if not args:
-        private_dir = None
-    else:
-        private_dir = args[0]
-        if not private_dir.startswith('/'):
-            # handle usr/share/foo dirs (without leading slash)
-            private_dir = '/' + private_dir
-    # TODO: support more than one private dir at the same time (see :meth:scan)
-    if options.skip_private:
-        private_dir = False
-
-    if options.verbose or os.environ.get('DH_VERBOSE') == '1':
-        log.setLevel(logging.DEBUG)
-        log.debug('argv: %s', sys.argv)
-        log.debug('options: %s', options)
-        log.debug('args: %s', args)
-
-    dh = DebHelper(options)
-    if not options.vrange and dh.python_version:
-        options.vrange = parse_pycentral_vrange(dh.python_version)
-
-    for package, pdetails in dh.packages.iteritems():
-        if options.arch is False and pdetails['arch'] != 'all' or \
-           options.arch is True and pdetails['arch'] == 'all':
-            continue
-        log.debug('processing package %s...', package)
-        if not private_dir:
-            if not pyinstall(package, options.vrange):
-                exit(4)
-            if not pyremove(package, options.vrange):
-                exit(5)
-            fix_locations(package)
-        stats = scan(package, private_dir, options)
-        if not private_dir:
-            share(package, stats, options)
-            pyshared_dir = "debian/%s/usr/share/pyshared/" % package
-            if not stats['public_vers'] and exists(pyshared_dir):
-                create_public_links(pyshared_dir, options.vrange)
-                stats['public_vers'] = get_requested_versions(options.vrange)
-                stats['compile'] = True
-
-        dependencies = Dependencies(package)
-        dependencies.parse(stats, options)
-
-        if stats['public_vers']:
-            dh.addsubstvar(package, 'python:Versions', \
-                           ', '.join(sorted(vrepr(stats['public_vers']))))
-            ps = package.split('-', 1)
-            if len(ps) > 1 and ps[0] == 'python':
-                dh.addsubstvar(package, 'python:Provides', \
-                           ', '.join("python%s-%s" % (i, ps[1])\
-                           for i in sorted(vrepr(stats['public_vers']))))
-
-        pyclean_added = False  # invoke pyclean only once in maintainer script
-        if stats['compile']:
-            if options.clean_pycentral:
-                dh.autoscript(package, 'preinst',
-                              'preinst-pycentral-clean', '')
-            dh.autoscript(package, 'postinst', 'postinst-pycompile', '')
-            dh.autoscript(package, 'prerm', 'prerm-pyclean', '')
-            pyclean_added = True
-
-        for pdir, details in stats['private_dirs'].iteritems():
-            if not details.get('compile'):
-                continue
-            if not pyclean_added:
-                dh.autoscript(package, 'prerm', 'prerm-pyclean', '')
-                pyclean_added = True
-
-            args = pdir
-
-            ext_for = details.get('ext')
-            if ext_for is None:  # no extension
-                shebangs = list(v for i, v in details.get('shebangs', []) if v)
-                if not options.ignore_shebangs and len(shebangs) == 1:
-                    # only one version from shebang
-                    args += " -V %s" % vrepr(shebangs[0])
-                elif options.vrange and options.vrange != (None, None):
-                    args += " -V %s" % vrange_str(options.vrange)
-            elif False in ext_for:
-                # at least one extension's version not detected
-                if options.vrange and '-' not in vrange_str(options.vrange):
-                    ver = vrange_str(options.vrange)
-                else:  # try shebang or default Python version
-                    ver = (list(v for i, v in details.get('shebangs', [])
-                           if v) or [None])[0] or DEFAULT
-                    ver = vrepr(ver)
-                dependencies.depend("python%s" % ver)
-                args += " -V %s" % vrepr(ver)
-            else:
-                version = ext_for.pop()
-                args += " -V %s" % vrepr(version)
-                dependencies.depend("python%d.%d" % version)
-
-            for pattern in options.regexpr or []:
-                args += " -X '%s'" % pattern.replace("'", r"'\''")
-
-            dh.autoscript(package, 'postinst', 'postinst-pycompile', args)
-
-        dependencies.export_to(dh)
-
-        pydist_file = join('debian', "%s.pydist" % package)
-        if exists(pydist_file):
-            if not validate_pydist(pydist_file):
-                log.warning("%s.pydist file is invalid", package)
-            else:
-                dstdir = join('debian', package, 'usr/share/python/dist/')
-                if not exists(dstdir):
-                    os.makedirs(dstdir)
-                fcopy(pydist_file, join(dstdir, package))
-
-        # namespace feature - recreate __init__.py files at install time
-        if options.ignore_namespace:
-            nsp = None
-        else:
-            nsp = ns.parse(stats['nsp.txt'], options.namespaces)
-        # note that pycompile/pyclean is already added to maintainer scripts
-        # and it should remain there even if __init__.py was the only .py file
-        if nsp:
-            try:
-                nsp = ns.remove_from_package(package, nsp,
-                                             stats['public_vers'])
-            except (IOError, OSError), e:
-                log.error('cannot remove __init__.py from package: %s', e)
-                exit(6)
-        if nsp:
-            dstdir = join('debian', package, 'usr/share/python/ns/')
-            if not exists(dstdir):
-                os.makedirs(dstdir)
-            with open(join(dstdir, package), 'a') as fp:
-                fp.writelines("%s\n" % i for i in nsp)
-
-        pyshared = join('debian', package, 'usr/share/pyshared/')
-        if isdir(pyshared) and not os.listdir(pyshared):
-            # remove empty pyshared directory
-            os.rmdir(pyshared)
-
-    dh.save()
-
-if __name__ == '__main__':
-    main()
diff --git a/dh_python2.1 b/dh_python2.1
deleted file mode 100644
index b80b16f7b9bf0f4995b96548c5d3ba1ab6b60932..0000000000000000000000000000000000000000
--- a/dh_python2.1
+++ /dev/null
@@ -1,267 +0,0 @@
-.\" Man page generated from reStructuredText.
-.
-.TH DH_PYTHON2 1 "" "" ""
-.SH NAME
-dh_python2 \- calculates Python dependencies, adds maintainer scripts to byte compile files, etc.
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.SH SYNOPSIS
-.INDENT 0.0
-.INDENT 3.5
-dh_python2 \-p PACKAGE [\-V [X.Y][\-][A.B]] DIR_OR_FILE [\-X REGEXPR]
-.UNINDENT
-.UNINDENT
-.SH DESCRIPTION
-.SS QUICK GUIDE FOR MAINTAINERS
-.INDENT 0.0
-.INDENT 3.5
-.INDENT 0.0
-.IP \(bu 2
-if necessary, describe supported Python versions via X\-Python\-Version field
-in debian/control,
-.IP \(bu 2
-build\-depend on python or python\-all or python\-all\-dev (>= 2.6.6\-3~),
-.IP \(bu 2
-build module/application using its standard build system,
-remember to build extensions for all supported Python versions (loop over
-\fBpyversions \-vr\fP),
-.IP \(bu 2
-install files to the \fIstandard\fP locations, add \fI\-\-install\-layout=deb\fP to
-setup.py\(aqs install command if your package is using distutils,
-.IP \(bu 2
-add \fIpython2\fP to dh\(aqs \-\-with option, or:
-.IP \(bu 2
-\fIinclude /usr/share/cdbs/1/class/python\-distutils.mk\fP in debian/rules and
-depend on \fIcdbs (>= 0.4.90)\fP, or:
-.IP \(bu 2
-call \fBdh_python2\fP in the \fIbinary\-*\fP target,
-.IP \(bu 2
-add \fI${python:Depends}\fP to Depends
-.UNINDENT
-.UNINDENT
-.UNINDENT
-.SS NOTES
-.sp
-In order to support more than one Python version in the same binary package,
-dh_python2 (unlike dh_pycentral and dh_pysupport) creates symlinks to all
-supported Python versions at build time. It means binNMU (or sourceful upload
-in case of architecture independent packages) is required once a list of
-supported Python version is changed. It\(aqs faster and more robust than its
-competitors, though.
-.SS dependencies
-.sp
-dh_python2 tries to translate Python dependencies from requires.txt file to
-Debian dependencies. Use debian/pydist\-overrides or \-\-no\-guessing\-deps option
-to override it if the guess is incorrect. If you want dh_python2 to generate
-more strict dependencies (f.e. to avoid ABI problems) create
-debian/python\-foo.pydist file. See /usr/share/doc/python\-doc/README.PyDist
-(provided by python\-doc package) for more information. If the pydist file
-contains PEP386 flag or set of (uscan like) rules, dh_python2 will make the
-dependency versioned (version requirements are ignored by default).
-.SS namespace feature
-.sp
-dh_python2 parses Egg\(aqs namespace_packages.txt files (in addition to
-\-\-namespace command line argument(s)) and drops empty __init__.py files from
-binary package. pycompile will regenerate them at install time and pyclean
-will remove them at uninstall time (if they\(aqre no longer used in installed
-packages). It\(aqs still a good idea to provide __init__.py file in one of
-binary packages (even if all other packages use this feature).
-.SS private dirs
-.sp
-\fI/usr/share/foo\fP, \fI/usr/share/games/foo\fP, \fI/usr/lib/foo\fP and
-\fI/usr/lib/games/foo\fP private directories are scanned for Python files
-by default (where \fIfoo\fP is binary package name). If your package is shipping
-Python files in some other directory, add another dh_python2 call in
-debian/rules with directory name as an argument \- you can use different set of
-options in this call. If you need to change options (f.e. a list of supported
-Python versions) for a private directory that is checked by default, invoke
-dh_python2 with \-\-skip\-private option and add another call with a path to this
-directory and new options.
-.SS debug packages
-.sp
-In binary packages which name ends with \fI\-dbg\fP, all files in
-\fI/usr/lib/python2.X/{site,dist}\-packages/\fP directory
-that have extensions different than \fIso\fP or \fIh\fP are removed by default.
-Use \-\-no\-dbg\-cleaning option to disable this feature.
-.SS pyinstall files
-.sp
-Files listed in debian/pkg.pyinstall file will be installed as public modules
-for all requested Python versions (dh_install doesn\(aqt know about python\(aqs site\-
-vs. dist\-packages issue).
-.sp
-Syntax: \fBpath/to/file [VERSION_RANGE] [NAMESPACE]\fP
-.sp
-debian directory is automatically removed from the path, so you can place your
-files in debian/ directory and install them from this location (if you want to
-install them in "debian" namespace, set NAMESPACE to debian). If NAMESPACE is
-set, all listed files will be installed in .../dist\-packages/NAMESPACE/
-directory.
-.INDENT 0.0
-.TP
-.B Examples:
-.INDENT 7.0
-.IP \(bu 2
-\fBfoo.py\fP installs .../dist\-packages/foo.py for all supported Python versions
-.IP \(bu 2
-\fBfoo/bar.py 2.6\-\fP installs .../dist\-packages/foo/bar.py for versions >= 2.6
-.IP \(bu 2
-\fBfoo/bar.py spam\fP installs .../dist\-packages/spam/bar.py
-.IP \(bu 2
-\fBdebian/*.py spam.egg 2.5\fP installs .../python2.5/site\-packages/spam/egg/*.py
-files
-.UNINDENT
-.UNINDENT
-.SS pyremove files
-.sp
-If you want to remove some files installed by build system (from all supported
-Python versions or only from a subset of these versions), add them to
-debian/pkg.pyremove file.
-.INDENT 0.0
-.TP
-.B Examples:
-.INDENT 7.0
-.IP \(bu 2
-\fB*.pth\fP removes .pth files from .../dist\-packages/
-.IP \(bu 2
-\fBbar/baz.py 2.5\fP removes .../python2.5/site\-packages/bar/baz.py
-.UNINDENT
-.UNINDENT
-.SS overriding supported / default Python versions
-.sp
-If you want to override system\(aqs list of supported Python versions or the
-default one (f.e. to build a package that includes symlinks for older version
-of Python or compile .py files only for given interpreter version), you can do
-that via \fIDEBPYTHON_SUPPORTED\fP and/or \fIDEBPYTHON_DEFAULT\fP env. variables.
-.sp
-Example: \fB2.5,2.7\fP limits the list of supported Python versions to Python 2.5
-and Python 2.7.
-.SH OPTIONS
-.INDENT 0.0
-.TP
-.B \-\-version
-show program\(aqs version number and exit
-.TP
-.B \-h\fP,\fB  \-\-help
-show help message and exit
-.TP
-.B \-\-no\-guessing\-versions
-disable guessing other supported Python versions
-.TP
-.B \-\-no\-guessing\-deps
-disable guessing dependencies
-.TP
-.B \-\-no\-dbg\-cleaning
-do not remove any files from debug packages
-.TP
-.B \-\-no\-shebang\-rewrite
-do not rewrite shebangs
-.TP
-.B \-\-skip\-private
-don\(aqt check private directories
-.TP
-.B \-v\fP,\fB  \-\-verbose
-turn verbose mode on
-.TP
-.B \-i\fP,\fB  \-\-indep
-act on architecture independent packages
-.TP
-.B \-a\fP,\fB  \-\-arch
-act on architecture dependent packages
-.TP
-.B \-q\fP,\fB  \-\-quiet
-be quiet
-.TP
-.BI \-p \ PACKAGE\fP,\fB \ \-\-package\fB= PACKAGE
-act on the package named PACKAGE
-.TP
-.BI \-N \ NO_PACKAGE\fP,\fB \ \-\-no\-package\fB= NO_PACKAGE
-do not act on the specified package
-.TP
-.BI \-V \ VRANGE
-specify list of supported Python versions. See
-pycompile(1) for examples
-.TP
-.BI \-X \ REGEXPR\fP,\fB \ \-\-exclude\fB= REGEXPR
-exclude items that match given REGEXPR. You may
-use this option multiple times to build up a list of things to exclude.
-.TP
-.B \-\-compile\-all
-compile all files from given private directory in postinst/rtupdate
-not just the ones provided by the package (i.e. do not pass the \-\-package
-parameter to pycompile/pyclean)
-.TP
-.BI \-\-depends\fB= DEPENDS
-translate given requirements into Debian dependencies
-and add them to ${python:Depends}. Use it for missing items in requires.txt
-.TP
-.BI \-\-recommends\fB= RECOMMENDS
-translate given requirements into Debian dependencies
-and add them to ${python:Recommends}
-.TP
-.BI \-\-suggests\fB= SUGGESTS
-translate given requirements into Debian dependencies
-and add them to ${python:Suggests}
-.TP
-.B \-\-namespace
-use this option (multiple time if necessary) if
-namespace_packages.txt is not complete
-.TP
-.B \-\-ignore\-namespace
-ignore Egg\(aqs namespace declaration and
-\-\-namespace option. This option will disable removing (and recreating at
-install time) empty __init__.py files. Removing namespace_packages.txt from
-egg\-info directory has the same effect.
-.TP
-.B \-\-clean\-pycentral
-generate maintainer script that will remove byte code
-generated by python\-central helper
-.TP
-.BI \-\-shebang\fB= COMMAND
-use given command as shebang in scripts
-.TP
-.B \-\-ignore\-shebangs
-do not translate shebangs into Debian dependencies
-.UNINDENT
-.SH SEE ALSO
-.INDENT 0.0
-.IP \(bu 2
-/usr/share/doc/python/python\-policy.txt.gz
-.IP \(bu 2
-/usr/share/doc/python\-doc/README.PyDist (python\-doc package)
-.IP \(bu 2
-pycompile(1), pyclean(1)
-.IP \(bu 2
-dh_python3(1), py3compile(1), py3clean(1)
-.IP \(bu 2
-Wiki page about converting package to dh_python2:
-\fI\%http://wiki.debian.org/Python/TransitionToDHPython2\fP
-.UNINDENT
-.SH AUTHOR
-Piotr Ożarowski, 2012-2013
-.\" Generated by docutils manpage writer.
-.
diff --git a/dh_python2.py b/dh_python2.py
deleted file mode 100755
index c2b22f1191057c20fa73960272606400a106e75c..0000000000000000000000000000000000000000
--- a/dh_python2.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /usr/bin/python
-
-from os.path import exists
-from subprocess import call
-from sys import argv
-from re import compile
-
-OLD = '/usr/share/python/dh_python2'
-NEW = '/usr/share/dh-python/dh_python2'
-has_dhpython = compile(r'(^|:|\s|,)dh-python($|\s|,|\()').search
-
-binary = OLD
-if exists(NEW) and exists('debian/control'):
-    with open('debian/control', 'r') as fp:
-        inside = False
-        for line in fp:
-            if not line:
-                break
-            line_lower = line.lower()
-            if inside:
-                if line.startswith((' ', "\t")):
-                    if has_dhpython(line):
-                        binary = NEW
-                        break
-                    continue
-                elif line.startswith('#'):
-                    continue
-                inside = False
-            if line_lower.startswith(('build-depends:', 'build-depends-indep:')):
-                if has_dhpython(line):
-                    binary = NEW
-                    break
-                inside = True
-
-argv[0] = binary
-exit(call(argv))
diff --git a/dh_python2.rst b/dh_python2.rst
deleted file mode 100644
index 075411ced2d3d032fef1c631c55be5994ebf7932..0000000000000000000000000000000000000000
--- a/dh_python2.rst
+++ /dev/null
@@ -1,196 +0,0 @@
-============
- dh_python2
-============
-
------------------------------------------------------------------------------------
-calculates Python dependencies, adds maintainer scripts to byte compile files, etc.
------------------------------------------------------------------------------------
-
-:Manual section: 1
-:Author: Piotr Ożarowski, 2012-2013
-
-SYNOPSIS
-========
-  dh_python2 -p PACKAGE [-V [X.Y][-][A.B]] DIR_OR_FILE [-X REGEXPR]
-
-DESCRIPTION
-===========
-
-QUICK GUIDE FOR MAINTAINERS
----------------------------
-
- * if necessary, describe supported Python versions via X-Python-Version field
-   in debian/control,
- * build-depend on python or python-all or python-all-dev (>= 2.6.6-3~),
- * build module/application using its standard build system,
-   remember to build extensions for all supported Python versions (loop over
-   ``pyversions -vr``),
- * install files to the *standard* locations, add `--install-layout=deb` to
-   setup.py's install command if your package is using distutils,
- * add `python2` to dh's --with option, or:
- * `include /usr/share/cdbs/1/class/python-distutils.mk` in debian/rules and
-   depend on `cdbs (>= 0.4.90)`, or:
- * call ``dh_python2`` in the `binary-*` target,
- * add `${python:Depends}` to Depends
-
-NOTES
------
-
-In order to support more than one Python version in the same binary package,
-dh_python2 (unlike dh_pycentral and dh_pysupport) creates symlinks to all
-supported Python versions at build time. It means binNMU (or sourceful upload
-in case of architecture independent packages) is required once a list of
-supported Python version is changed. It's faster and more robust than its
-competitors, though.
-
-dependencies
-~~~~~~~~~~~~
-dh_python2 tries to translate Python dependencies from requires.txt file to
-Debian dependencies. Use debian/pydist-overrides or --no-guessing-deps option
-to override it if the guess is incorrect. If you want dh_python2 to generate
-more strict dependencies (f.e. to avoid ABI problems) create
-debian/python-foo.pydist file. See /usr/share/doc/python-doc/README.PyDist
-(provided by python-doc package) for more information. If the pydist file
-contains PEP386 flag or set of (uscan like) rules, dh_python2 will make the
-dependency versioned (version requirements are ignored by default).
-
-namespace feature
-~~~~~~~~~~~~~~~~~
-dh_python2 parses Egg's namespace_packages.txt files (in addition to
---namespace command line argument(s)) and drops empty __init__.py files from
-binary package. pycompile will regenerate them at install time and pyclean
-will remove them at uninstall time (if they're no longer used in installed
-packages). It's still a good idea to provide __init__.py file in one of
-binary packages (even if all other packages use this feature).
-
-private dirs
-~~~~~~~~~~~~
-`/usr/share/foo`, `/usr/share/games/foo`, `/usr/lib/foo` and
-`/usr/lib/games/foo` private directories are scanned for Python files
-by default (where `foo` is binary package name). If your package is shipping
-Python files in some other directory, add another dh_python2 call in
-debian/rules with directory name as an argument - you can use different set of
-options in this call. If you need to change options (f.e. a list of supported
-Python versions) for a private directory that is checked by default, invoke
-dh_python2 with --skip-private option and add another call with a path to this
-directory and new options.
-
-debug packages
-~~~~~~~~~~~~~~
-In binary packages which name ends with `-dbg`, all files in
-`/usr/lib/python2.X/{site,dist}-packages/` directory 
-that have extensions different than `so` or `h` are removed by default.
-Use --no-dbg-cleaning option to disable this feature.
-
-pyinstall files
-~~~~~~~~~~~~~~~
-Files listed in debian/pkg.pyinstall file will be installed as public modules
-for all requested Python versions (dh_install doesn't know about python's site-
-vs. dist-packages issue).
-
-Syntax: ``path/to/file [VERSION_RANGE] [NAMESPACE]``
-
-debian directory is automatically removed from the path, so you can place your
-files in debian/ directory and install them from this location (if you want to
-install them in "debian" namespace, set NAMESPACE to debian). If NAMESPACE is
-set, all listed files will be installed in .../dist-packages/NAMESPACE/
-directory.
-
-Examples:
- * ``foo.py`` installs .../dist-packages/foo.py for all supported Python versions
- * ``foo/bar.py 2.6-`` installs .../dist-packages/foo/bar.py for versions >= 2.6
- * ``foo/bar.py spam`` installs .../dist-packages/spam/bar.py
- * ``debian/*.py spam.egg 2.5`` installs .../python2.5/site-packages/spam/egg/\*.py
-   files
-
-pyremove files
-~~~~~~~~~~~~~~
-If you want to remove some files installed by build system (from all supported
-Python versions or only from a subset of these versions), add them to
-debian/pkg.pyremove file.
-
-Examples:
- * ``*.pth`` removes .pth files from .../dist-packages/
- * ``bar/baz.py 2.5`` removes .../python2.5/site-packages/bar/baz.py
-
-overriding supported / default Python versions
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-If you want to override system's list of supported Python versions or the
-default one (f.e. to build a package that includes symlinks for older version
-of Python or compile .py files only for given interpreter version), you can do
-that via `DEBPYTHON_SUPPORTED` and/or `DEBPYTHON_DEFAULT` env. variables.
-
-Example: ``2.5,2.7`` limits the list of supported Python versions to Python 2.5
-and Python 2.7.
-
-
-OPTIONS
-=======
---version	show program's version number and exit
-
--h, --help	show help message and exit
-
---no-guessing-versions	disable guessing other supported Python versions
-
---no-guessing-deps	disable guessing dependencies
-
---no-dbg-cleaning	do not remove any files from debug packages
-
---no-shebang-rewrite	do not rewrite shebangs
-
---skip-private	don't check private directories
-
--v, --verbose	turn verbose mode on
-
--i, --indep	act on architecture independent packages
-
--a, --arch	act on architecture dependent packages
-
--q, --quiet	be quiet
-
--p PACKAGE, --package=PACKAGE	act on the package named PACKAGE
-
--N NO_PACKAGE, --no-package=NO_PACKAGE	do not act on the specified package
-
--V VRANGE	specify list of supported Python versions. See
-  pycompile(1) for examples
-
--X REGEXPR, --exclude=REGEXPR	exclude items that match given REGEXPR. You may
-  use this option multiple times to build up a list of things to exclude.
-
---compile-all	compile all files from given private directory in postinst/rtupdate
-  not just the ones provided by the package (i.e. do not pass the --package
-  parameter to pycompile/pyclean)
-
---depends=DEPENDS	translate given requirements into Debian dependencies
-  and add them to ${python:Depends}. Use it for missing items in requires.txt
-
---recommends=RECOMMENDS		translate given requirements into Debian dependencies
-  and add them to ${python:Recommends}
-
---suggests=SUGGESTS	translate given requirements into Debian dependencies
-  and add them to ${python:Suggests}
-
---namespace	use this option (multiple time if necessary) if
-  namespace_packages.txt is not complete
-
---ignore-namespace	ignore Egg's namespace declaration and
-  --namespace option. This option will disable removing (and recreating at
-  install time) empty __init__.py files. Removing namespace_packages.txt from
-  egg-info directory has the same effect.
-
---clean-pycentral	generate maintainer script that will remove byte code
-  generated by python-central helper
-
---shebang=COMMAND	use given command as shebang in scripts
-
---ignore-shebangs	do not translate shebangs into Debian dependencies
-
-SEE ALSO
-========
-* /usr/share/doc/python/python-policy.txt.gz
-* /usr/share/doc/python-doc/README.PyDist (python-doc package)
-* pycompile(1), pyclean(1)
-* dh_python3(1), py3compile(1), py3clean(1)
-* Wiki page about converting package to dh_python2:
-  http://wiki.debian.org/Python/TransitionToDHPython2
diff --git a/pyclean b/pyclean
index 4d5eade7dec1848093aba0bd14cca53d9fd579ef..ba9b636479790c779923345a7fdcb800f601f51f 100755
--- a/pyclean
+++ b/pyclean
@@ -1,7 +1,7 @@
 #! /usr/bin/python2
 # -*- coding: UTF-8 -*- vim: et ts=4 sw=4
 #
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
+# Copyright © 2010-2019 Piotr Ożarowski <piotr@debian.org>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
diff --git a/pycompile b/pycompile
index df54eb670797d7e6f542d877884fadf3601412f9..60b41babf188bb54558e7f2ce87dc2e4a063728e 100755
--- a/pycompile
+++ b/pycompile
@@ -1,7 +1,7 @@
 #! /usr/bin/python2
 # -*- coding: utf-8 -*- vim: et ts=4 sw=4
 #
-# Copyright © 2010-2012 Piotr Ożarowski <piotr@debian.org>
+# Copyright © 2010-2019 Piotr Ożarowski <piotr@debian.org>
 # Copyright © 2010 Canonical Ltd
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -37,8 +37,7 @@ from debpython.version import SUPPORTED, debsorted, vrepr, \
 from debpython import files as dpf
 from debpython.namespace import add_namespace_files
 from debpython.option import Option, compile_regexpr
-from debpython.pydist import PUBLIC_DIR_RE
-from debpython.tools import memoize
+from debpython.tools import memoize, PUBLIC_DIR_RE
 
 # initialize script
 logging.basicConfig(format='%(levelname).1s: %(module)s:%(lineno)d: '
diff --git a/pydist/Makefile b/pydist/Makefile
deleted file mode 100644
index 78e8796589205a8a531cbdcf1140076a10770798..0000000000000000000000000000000000000000
--- a/pydist/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/make -f
-
-clean:
-	rm -rf cache
-	#rm -f dist_fallback
-
-dist_fallback: sources.list
-	python ./generate_fallback_list.py --skip-sensible-names
-
-.PHONY: clean
diff --git a/pydist/README.PyDist b/pydist/README.PyDist
deleted file mode 100644
index 57ebacecdce17fe6ce116a470e96ee13f0826280..0000000000000000000000000000000000000000
--- a/pydist/README.PyDist
+++ /dev/null
@@ -1,83 +0,0 @@
-============
-PyDist files
-============
-
-DISTNAME [VRANGE] [DEPENDENCY][; [PEP386] [RULES]]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-PyDist files help tools like dh_python2 to translate Python dependencies (from
-setup.py's install_requires or egg's requires.txt file) to Debian dependencies.
-
-
-Required fields:
-~~~~~~~~~~~~~~~~
-
-DISTNAME
-````````
-Python distribution name (you can find it at the beginning of .egg-info
-file/directory name that your package provides).
-
-Examples:
- * SQLAlchemy
- * Jinja2
- * numpy
-
-
-Optional fields:
-~~~~~~~~~~~~~~~~
-
-VRANGE
-``````
-Python version or version range the line applies to.
-
-Examples:
- * 2.6		(Python 2.6 only)
- * 2.5-		(Python 2.5 and newer)
- * 2.5-2.7	(Python 2.5 or 2.6)
- * -2.7		(Python 2.6 or older)
-
-DEPENDENCY
-``````````
-Debian dependency, multiple packages or versions are allowed.
-If not set, given Python distribution name will be ignored.
-
-Examples:
- * python-mako
- * python-jinja2 | python (>= 2.6)
- * python-sqlalchemy (>= 0.5), python-sqlalchemy (<< 0.6)
-
-PEP386
-``````
-Standards flag: upstream uses versioning schema described in PEP 386.
-
-RULES
-`````
-Rules needed to translate upstream version to Debian one. If PEP386 is
-set, its rules will be applied later. Multiple rules are allowed, separate them
-with a space.
-
-Examples:
- * s/^/2:/
- * s/alpha/~alpha/ s/^/1:/
-
-
-Notes:
-~~~~~~
-
-You can use multiple lines if binary package provides more than one Python
-distribution or if you want to specify different dependencies for each Python
-version or version range.
-
-If you use dh_python2, it will install debian/binary_package_name.pydist file
-to /usr/share/python/dist/binary_package_name automatically.
-
-
-Complete examples:
-~~~~~~~~~~~~~~~~~~
- * SQLAlchemy python-sqlalchemy (>= 0.5), python-sqlalchemy (<< 0.6)
- * Mako python-mako; PEP386
- * foo -2.5 python-oldfoo; s/^/3:/
- * foo 2.5- python-foo; PEP386
- * Bar 2.6-
-
-.. vim: ft=rst
diff --git a/pydist/README.PyDist.html b/pydist/README.PyDist.html
deleted file mode 100644
index 3bba448e0258042316cade46a0df9c80f597785c..0000000000000000000000000000000000000000
--- a/pydist/README.PyDist.html
+++ /dev/null
@@ -1,438 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
-<title>PyDist files</title>
-<style type="text/css">
-
-/*
-:Author: David Goodger (goodger@python.org)
-:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
-:Copyright: This stylesheet has been placed in the public domain.
-
-Default cascading style sheet for the HTML output of Docutils.
-
-See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
-customize this style sheet.
-*/
-
-/* used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
-  border: 0 }
-
-table.borderless td, table.borderless th {
-  /* Override padding for "table.docutils td" with "! important".
-     The right padding separates the table cells. */
-  padding: 0 0.5em 0 0 ! important }
-
-.first {
-  /* Override more specific margin styles with "! important". */
-  margin-top: 0 ! important }
-
-.last, .with-subtitle {
-  margin-bottom: 0 ! important }
-
-.hidden {
-  display: none }
-
-a.toc-backref {
-  text-decoration: none ;
-  color: black }
-
-blockquote.epigraph {
-  margin: 2em 5em ; }
-
-dl.docutils dd {
-  margin-bottom: 0.5em }
-
-object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
-  overflow: hidden;
-}
-
-/* Uncomment (and remove this text!) to get bold-faced definition list terms
-dl.docutils dt {
-  font-weight: bold }
-*/
-
-div.abstract {
-  margin: 2em 5em }
-
-div.abstract p.topic-title {
-  font-weight: bold ;
-  text-align: center }
-
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
-  margin: 2em ;
-  border: medium outset ;
-  padding: 1em }
-
-div.admonition p.admonition-title, div.hint p.admonition-title,
-div.important p.admonition-title, div.note p.admonition-title,
-div.tip p.admonition-title {
-  font-weight: bold ;
-  font-family: sans-serif }
-
-div.attention p.admonition-title, div.caution p.admonition-title,
-div.danger p.admonition-title, div.error p.admonition-title,
-div.warning p.admonition-title, .code .error {
-  color: red ;
-  font-weight: bold ;
-  font-family: sans-serif }
-
-/* Uncomment (and remove this text!) to get reduced vertical space in
-   compound paragraphs.
-div.compound .compound-first, div.compound .compound-middle {
-  margin-bottom: 0.5em }
-
-div.compound .compound-last, div.compound .compound-middle {
-  margin-top: 0.5em }
-*/
-
-div.dedication {
-  margin: 2em 5em ;
-  text-align: center ;
-  font-style: italic }
-
-div.dedication p.topic-title {
-  font-weight: bold ;
-  font-style: normal }
-
-div.figure {
-  margin-left: 2em ;
-  margin-right: 2em }
-
-div.footer, div.header {
-  clear: both;
-  font-size: smaller }
-
-div.line-block {
-  display: block ;
-  margin-top: 1em ;
-  margin-bottom: 1em }
-
-div.line-block div.line-block {
-  margin-top: 0 ;
-  margin-bottom: 0 ;
-  margin-left: 1.5em }
-
-div.sidebar {
-  margin: 0 0 0.5em 1em ;
-  border: medium outset ;
-  padding: 1em ;
-  background-color: #ffffee ;
-  width: 40% ;
-  float: right ;
-  clear: right }
-
-div.sidebar p.rubric {
-  font-family: sans-serif ;
-  font-size: medium }
-
-div.system-messages {
-  margin: 5em }
-
-div.system-messages h1 {
-  color: red }
-
-div.system-message {
-  border: medium outset ;
-  padding: 1em }
-
-div.system-message p.system-message-title {
-  color: red ;
-  font-weight: bold }
-
-div.topic {
-  margin: 2em }
-
-h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
-h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
-  margin-top: 0.4em }
-
-h1.title {
-  text-align: center }
-
-h2.subtitle {
-  text-align: center }
-
-hr.docutils {
-  width: 75% }
-
-img.align-left, .figure.align-left, object.align-left {
-  clear: left ;
-  float: left ;
-  margin-right: 1em }
-
-img.align-right, .figure.align-right, object.align-right {
-  clear: right ;
-  float: right ;
-  margin-left: 1em }
-
-img.align-center, .figure.align-center, object.align-center {
-  display: block;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-.align-left {
-  text-align: left }
-
-.align-center {
-  clear: both ;
-  text-align: center }
-
-.align-right {
-  text-align: right }
-
-/* reset inner alignment in figures */
-div.align-right {
-  text-align: inherit }
-
-/* div.align-center * { */
-/*   text-align: left } */
-
-ol.simple, ul.simple {
-  margin-bottom: 1em }
-
-ol.arabic {
-  list-style: decimal }
-
-ol.loweralpha {
-  list-style: lower-alpha }
-
-ol.upperalpha {
-  list-style: upper-alpha }
-
-ol.lowerroman {
-  list-style: lower-roman }
-
-ol.upperroman {
-  list-style: upper-roman }
-
-p.attribution {
-  text-align: right ;
-  margin-left: 50% }
-
-p.caption {
-  font-style: italic }
-
-p.credits {
-  font-style: italic ;
-  font-size: smaller }
-
-p.label {
-  white-space: nowrap }
-
-p.rubric {
-  font-weight: bold ;
-  font-size: larger ;
-  color: maroon ;
-  text-align: center }
-
-p.sidebar-title {
-  font-family: sans-serif ;
-  font-weight: bold ;
-  font-size: larger }
-
-p.sidebar-subtitle {
-  font-family: sans-serif ;
-  font-weight: bold }
-
-p.topic-title {
-  font-weight: bold }
-
-pre.address {
-  margin-bottom: 0 ;
-  margin-top: 0 ;
-  font: inherit }
-
-pre.literal-block, pre.doctest-block, pre.math, pre.code {
-  margin-left: 2em ;
-  margin-right: 2em }
-
-pre.code .ln { color: grey; } /* line numbers */
-pre.code, code { background-color: #eeeeee }
-pre.code .comment, code .comment { color: #5C6576 }
-pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
-pre.code .literal.string, code .literal.string { color: #0C5404 }
-pre.code .name.builtin, code .name.builtin { color: #352B84 }
-pre.code .deleted, code .deleted { background-color: #DEB0A1}
-pre.code .inserted, code .inserted { background-color: #A3D289}
-
-span.classifier {
-  font-family: sans-serif ;
-  font-style: oblique }
-
-span.classifier-delimiter {
-  font-family: sans-serif ;
-  font-weight: bold }
-
-span.interpreted {
-  font-family: sans-serif }
-
-span.option {
-  white-space: nowrap }
-
-span.pre {
-  white-space: pre }
-
-span.problematic {
-  color: red }
-
-span.section-subtitle {
-  /* font-size relative to parent (h1..h6 element) */
-  font-size: 80% }
-
-table.citation {
-  border-left: solid 1px gray;
-  margin-left: 1px }
-
-table.docinfo {
-  margin: 2em 4em }
-
-table.docutils {
-  margin-top: 0.5em ;
-  margin-bottom: 0.5em }
-
-table.footnote {
-  border-left: solid 1px black;
-  margin-left: 1px }
-
-table.docutils td, table.docutils th,
-table.docinfo td, table.docinfo th {
-  padding-left: 0.5em ;
-  padding-right: 0.5em ;
-  vertical-align: top }
-
-table.docutils th.field-name, table.docinfo th.docinfo-name {
-  font-weight: bold ;
-  text-align: left ;
-  white-space: nowrap ;
-  padding-left: 0 }
-
-/* "booktabs" style (no vertical lines) */
-table.docutils.booktabs {
-  border: 0px;
-  border-top: 2px solid;
-  border-bottom: 2px solid;
-  border-collapse: collapse;
-}
-table.docutils.booktabs * {
-  border: 0px;
-}
-table.docutils.booktabs th {
-  border-bottom: thin solid;
-  text-align: left;
-}
-
-h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
-h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
-  font-size: 100% }
-
-ul.auto-toc {
-  list-style-type: none }
-
-</style>
-</head>
-<body>
-<div class="document" id="pydist-files">
-<h1 class="title">PyDist files</h1>
-
-<div class="section" id="distname-vrange-dependency-pep386-rules">
-<h1>DISTNAME [VRANGE] [DEPENDENCY][; [PEP386] [RULES]]</h1>
-<p>PyDist files help tools like dh_python2 to translate Python dependencies (from
-setup.py's install_requires or egg's requires.txt file) to Debian dependencies.</p>
-</div>
-<div class="section" id="required-fields">
-<h1>Required fields:</h1>
-<div class="section" id="distname">
-<h2>DISTNAME</h2>
-<p>Python distribution name (you can find it at the beginning of .egg-info
-file/directory name that your package provides).</p>
-<dl class="docutils">
-<dt>Examples:</dt>
-<dd><ul class="first last simple">
-<li>SQLAlchemy</li>
-<li>Jinja2</li>
-<li>numpy</li>
-</ul>
-</dd>
-</dl>
-</div>
-</div>
-<div class="section" id="optional-fields">
-<h1>Optional fields:</h1>
-<div class="section" id="vrange">
-<h2>VRANGE</h2>
-<p>Python version or version range the line applies to.</p>
-<dl class="docutils">
-<dt>Examples:</dt>
-<dd><ul class="first last simple">
-<li>2.6          (Python 2.6 only)</li>
-<li>2.5-         (Python 2.5 and newer)</li>
-<li>2.5-2.7      (Python 2.5 or 2.6)</li>
-<li>-2.7         (Python 2.6 or older)</li>
-</ul>
-</dd>
-</dl>
-</div>
-<div class="section" id="dependency">
-<h2>DEPENDENCY</h2>
-<p>Debian dependency, multiple packages or versions are allowed.
-If not set, given Python distribution name will be ignored.</p>
-<dl class="docutils">
-<dt>Examples:</dt>
-<dd><ul class="first last simple">
-<li>python-mako</li>
-<li>python-jinja2 | python (&gt;= 2.6)</li>
-<li>python-sqlalchemy (&gt;= 0.5), python-sqlalchemy (&lt;&lt; 0.6)</li>
-</ul>
-</dd>
-</dl>
-</div>
-<div class="section" id="pep386">
-<h2>PEP386</h2>
-<p>Standards flag: upstream uses versioning schema described in PEP 386.</p>
-</div>
-<div class="section" id="rules">
-<h2>RULES</h2>
-<p>Rules needed to translate upstream version to Debian one. If PEP386 is
-set, its rules will be applied later. Multiple rules are allowed, separate them
-with a space.</p>
-<dl class="docutils">
-<dt>Examples:</dt>
-<dd><ul class="first last simple">
-<li>s/^/2:/</li>
-<li>s/alpha/~alpha/ s/^/1:/</li>
-</ul>
-</dd>
-</dl>
-</div>
-</div>
-<div class="section" id="notes">
-<h1>Notes:</h1>
-<p>You can use multiple lines if binary package provides more than one Python
-distribution or if you want to specify different dependencies for each Python
-version or version range.</p>
-<p>If you use dh_python2, it will install debian/binary_package_name.pydist file
-to /usr/share/python/dist/binary_package_name automatically.</p>
-</div>
-<div class="section" id="complete-examples">
-<h1>Complete examples:</h1>
-<blockquote>
-<ul class="simple">
-<li>SQLAlchemy python-sqlalchemy (&gt;= 0.5), python-sqlalchemy (&lt;&lt; 0.6)</li>
-<li>Mako python-mako; PEP386</li>
-<li>foo -2.5 python-oldfoo; s/^/3:/</li>
-<li>foo 2.5- python-foo; PEP386</li>
-<li>Bar 2.6-</li>
-</ul>
-</blockquote>
-<!-- vim: ft=rst -->
-</div>
-</div>
-</body>
-</html>
diff --git a/pydist/dist_fallback b/pydist/dist_fallback
deleted file mode 100644
index 2223b74f6b174886da2798529f6df1dbc5511bd3..0000000000000000000000000000000000000000
--- a/pydist/dist_fallback
+++ /dev/null
@@ -1,637 +0,0 @@
-python python
-setuptools python-pkg-resources
-wsgiref python (>= 2.5) | python-wsgiref
-argparse python (>= 2.7) | python-argparse
-pil python-imaging
-AddOns python-peak.util
-BatchModify trac-batchmodify
-BitTornado bittornado
-BitTorrent bittorrent
-Bitten trac-bitten-slave
-BytecodeAssembler python-peak.util
-BzrPipeline bzr-pipeline
-BzrTools bzrtools
-Calendar_and_Contacts_Server calendarserver
-CedarBackup2 cedar-backup2
-CherryPy python-cherrypy3
-CherryTree cherrytree
-ClusterShell clustershell
-Codeville codeville
-ControlAula controlaula
-CoverageTestRunner python-coverage-test-runner
-DITrack ditrack
-DebTorrent debtorrent
-DecoratorTools python-peak.util.decorators
-DiaVisViewPlugin trac-diavisview
-Djapian python-django-djapian
-Doconce doconce
-Dosage dosage
-DouF00 douf00
-Editra editra
-Extremes python-peak.util
-Fabric fabric
-FeinCMS python-django-feincms
-Flask_WTF python-flaskext.wtf
-GaussSum gausssum
-GeoIP_Python python-geoip
-GitPython python-git
-HarvestMan harvestman
-ISO8583_Module python-iso8583
-Ibid ibid
-JCC jcc
-Loom bzr-loom
-MAT mat
-Magic_file_extensions python-magic
-Mirage mirage
-Mnemosyne mnemosyne
-Model_Builder model-builder
-MySQL_python python-mysqldb
-Nautilus_scripts_manager nautilus-scripts-manager
-Nulog nulog
-OdtExportPlugin trac-odtexport
-PEAK_Rules python-peak.rules
-PIDA pida
-Photon photon
-Plywood plywood
-Postr postr
-PreludeEasy python-prelude
-PsychoPy psychopy
-Pwman3 pwman3
-PyAIML python-aiml
-PyBluez python-bluez
-PyCAPTCHA python-captcha
-PyCoCuMa pycocuma
-PyFFTW3 python-fftw
-PyHamcrest python-hamcrest
-PyMca pymca
-PyMetrics pymetrics
-PyNAST pynast
-PyOpenGL python-opengl
-PyProtocols python-protocols
-PyRoom pyroom
-PySFML python-sfml
-PyStemmer python-stemmer
-PyWavelets python-pywt
-PyWebDAV python-webdav
-PyYAML python-yaml
-Py_ python-py++
-Pygmy pygmy
-Pymacs pymacs
-Pyste libboost-python1.49-dev
-PythonDaap python-daap
-QuantLib_Python quantlib-python
-Quixote python-quixote1
-Ren_Py python-renpy
-Roadmap_Plugin trac-roadmap
-RunSnakeRun runsnakerun
-ScientificPython python-scientific
-Shinken shinken-core
-Sonata sonata
-South python-django-south
-SymbolType python-peak.util
-Symbolic python-swiginac
-TcosConfigurator tcos-configurator
-The_FreeSmartphone_Framework_Daemon fso-frameworkd
-TileCache tilecache
-TileStache tilestache
-Trac trac
-TracAccountManager trac-accountmanager
-TracAnnouncer trac-announcer
-TracAuthOpenId trac-authopenid
-TracBzr trac-bzr
-TracCustomFieldAdmin trac-customfieldadmin
-TracDateField trac-datefieldplugin
-TracGit trac-git
-TracHTTPAuth trac-httpauth
-TracMasterTickets trac-mastertickets
-TracMercurial trac-mercurial
-TracPrivateTickets trac-privatetickets
-TracSpamFilter trac-spamfilter
-TracSubTicketsPlugin trac-subtickets
-TracTags trac-tags
-TracVirtualTicketPermissions trac-virtualticketpermissions
-TracWikiPrintPlugin trac-wikiprint
-TracWysiwyg trac-wysiwyg
-TracXMLRPC trac-xmlrpc
-Trac_jsGantt trac-jsgantt
-Turtle_Art turtleart
-UNKNOWN python-pdfrw
-UnknownHorizons unknown-horizons
-VirtualMailManager vmm
-WikiTableMacro trac-wikitablemacro
-Wikkid wikkid
-WordPress_Library python-wordpresslib
-X_Tile x-tile
-ZODB3 python-zodb
-_tifffile tifffile
-activity_log_manager activity-log-manager
-adns_python python-adns
-agtl agtl
-alembic alembic
-allmydata_tahoe tahoe-lafs
-apache_libcloud python-libcloud
-apparmor apparmor-utils
-apt_clone apt-clone
-apt_p2p apt-p2p
-apt_xapian_index apt-xapian-index
-aptfs aptfs
-aptoncd aptoncd
-arandr arandr
-archivemail archivemail
-archmage archmage
-arista arista
-atheist atheist
-autokey autokey-common
-beautifulsoup4 python-bs4
-bicyclerepair bicyclerepair
-bley bley
-bookletimposer bookletimposer
-bpython bpython
-buildbot buildbot
-buildbot_slave buildbot-slave
-burn burn
-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_svn bzr-svn
-bzr_upload bzr-upload
-bzr_xmloutput bzr-xmloutput
-cappuccino cappuccino
-carbon graphite-carbon
-cardstories cardstories
-cfget cfget
-chirp chirp
-chm2pdf chm2pdf
-cm config-manager
-cmdtest cmdtest
-cpuset cpuset
-cvs2svn cvs2svn
-d_feet d-feet
-d_rats d-rats
-datapm datapm
-dblatex dblatex
-dctrl2xml dctrl2xml
-debpartial_mirror debpartial-mirror
-deluge deluge-common
-devscripts devscripts
-dicompyler dicompyler
-dissy dissy
-djagios djagios
-django_ajax_selects django-ajax-selects
-django_filter django-filter
-django_openid_auth python-django-auth-openid
-django_tables2 django-tables
-django_tastypie python-tastypie
-djextdirect python-django-extdirect
-dkimpy python-dkim
-dot2tex dot2tex
-driconf driconf
-dtrx dtrx
-duplicity duplicity
-dvcs_autosync dvcs-autosync
-eficas eficas
-elisa python-moovida
-elisa_plugin_amazon moovida-plugins-bad
-elisa_plugin_amp moovida-plugins-bad
-elisa_plugin_avahi moovida-plugins-bad
-elisa_plugin_base moovida-plugins-good
-elisa_plugin_coherence moovida-plugins-bad
-elisa_plugin_daap moovida-plugins-bad
-elisa_plugin_database moovida-plugins-bad
-elisa_plugin_discogs moovida-plugins-bad
-elisa_plugin_dvd moovida-plugins-bad
-elisa_plugin_elisa_updater moovida-plugins-bad
-elisa_plugin_filtered_shares moovida-plugins-bad
-elisa_plugin_flickr moovida-plugins-ugly
-elisa_plugin_gnome moovida-plugins-good
-elisa_plugin_gstreamer moovida-plugins-bad
-elisa_plugin_hal moovida-plugins-good
-elisa_plugin_http_client moovida-plugins-bad
-elisa_plugin_ipod moovida-plugins-bad
-elisa_plugin_lastfm moovida-plugins-bad
-elisa_plugin_lirc moovida-plugins-ugly
-elisa_plugin_osso moovida-plugins-bad
-elisa_plugin_pigment moovida-plugins-bad
-elisa_plugin_poblesec moovida-plugins-bad
-elisa_plugin_rss moovida-plugins-bad
-elisa_plugin_search moovida-plugins-bad
-elisa_plugin_shoutcast moovida-plugins-ugly
-elisa_plugin_smbwin32 moovida-plugins-bad
-elisa_plugin_themoviedb moovida-plugins-bad
-elisa_plugin_thetvdb moovida-plugins-bad
-elisa_plugin_winremote moovida-plugins-bad
-elisa_plugin_winscreensaver moovida-plugins-good
-elisa_plugin_wmd moovida-plugins-bad
-elisa_plugin_youtube moovida-plugins-ugly
-epigrass epigrass
-epoptes epoptes
-espeak_gui espeak-gui
-euca2ools euca2ools
-explorer bzr-explorer
-flashbake flashbake
-flickrfs flickrfs
-fontypython fontypython
-frescobaldi frescobaldi
-fts fts
-fts_clacks fts-clacks
-fts_fai fts-fai-ldap
-fts_ltsp fts-ltsp-ldap
-fts_opsi fts-opsi
-funkload funkload
-fuse_python python-fuse
-fusil fusil
-fuss_launcher fuss-launcher
-galternatives galternatives
-gameclock gameclock
-gaphor gaphor
-gastablesgui gastables
-gbp git-buildpackage
-gdevilspie gdevilspie
-gdmodule python-gd
-genbackupdata genbackupdata
-getmail getmail4
-geximon geximon
-git_review git-review
-github_cli github-cli
-giws giws
-gjots2 gjots2
-glipper glipper
-globs globs
-glue glue-sprite
-gmobilemedia gmobilemedia
-gnome_activity_journal gnome-activity-journal
-gnome_app_install gnome-codec-install
-gnomecatalog gnomecatalog
-gnuplot_py python-gnuplot
-go2 go2
-gozerbot gozerbot
-gozerplugs gozerbot-plugins
-gpodder gpodder
-gquilt gquilt
-graphviz trac-graphviz
-gunicorn gunicorn
-gvb gvb
-gwrite gwrite
-gyp gyp
-hgnested mercurial-nested
-hgsvn hgsvn
-hitchhhiker hitchhiker
-hotwire hotwire
-httpcode httpcode
-httpie httpie
-hyde hyde
-ibus_tegaki ibus-tegaki
-icalview trac-icalviewplugin
-identicurse identicurse
-imposm.parser python-imposm-parser
-iotop iotop
-ipython ipython
-isoquery isoquery
-jack jack
-jsb jsonbot
-juju juju
-kedpm kedpm
-keepnote keepnote
-key_mon key-mon
-keymapper keymapper
-kiki kiki
-lastfmsubmitd lastfmsubmitd
-lazygal lazygal
-legit legit
-libtpclient_py python-tp-client
-libtpproto_py python-tp-netlib
-lio lio-utils
-llnl_babel python-sidl
-llnl_babel_sidl_sidlx python-sidl
-loggerhead loggerhead
-londonlaw londonlaw
-lptools lptools
-lshell lshell
-ludev_t ludevit
-lybniz lybniz
-mayavi mayavi2
-mcomix mcomix
-mecab_python python-mecab
-mercurial mercurial-common
-mic mic2
-mimms mimms
-mingc python-ming
-mini_dinstall mini-dinstall
-miro miro
-mitmproxy mitmproxy
-mod_python libapache2-mod-python
-moin python-moinmoin
-moosic moosic
-mozilla_devscripts mozilla-devscripts
-mpDris mpdris
-museek_python_bindings python-museek
-musiclibrarian musiclibrarian
-mysql_utilities mysql-utilities
-nautilus_pastebin nautilus-pastebin
-neso tryton-neso
-netsnmp_python libsnmp-python
-nfoview nfoview
-nglister nglister
-nml nml
-nsscache nsscache
-nxt_python python-nxt
-obMenu obmenu
-obnam obnam
-oboinus oboinus
-offlineimap offlineimap
-oidua oidua
-ooo2dbk ooo2dbk
-ooolib_python python-ooolib
-openbmap_logger openbmap-logger
-openoffice_python python-openoffice
-openshot openshot
-openstack.common python-openstack-common
-osc osc
-pYsearch python-yahoo
-pbundler pbundler
-pdfposter pdfposter
-pdfshuffler pdfshuffler
-pep8 pep8
-perroquet perroquet
-pgxnclient pgxnclient
-photofilmstrip photofilmstrip
-pithos pithos
-pkpgcounter pkpgcounter
-playitslowly playitslowly
-pondus pondus
-prelude_correlator prelude-correlator
-prelude_notify prelude-notify
-preprocess preprocess
-presage_dbus_service presage-dbus
-prewikka prewikka
-prioritized_methods python-peak.rules
-proteus tryton-proteus
-prover9_mace4 prover9-mace4
-pssh pssh
-ptex2tex ptex2tex
-puddletag puddletag
-purity_ng purity-ng
-pyExcelerator python-excelerator
-pyFAI pyfai
-pyLibravatar python-libravatar
-pyOpenSSL python-openssl
-pyPortMidi python-pypm
-py_Asterisk python-asterisk
-py_pypcap python-pypcap
-py_rrdtool python-rrdtool
-py_sendfile python-sendfile
-pyacidobasic python-acidobasic
-pyacoustid python-acoustid
-pyalsaaudio python-alsaaudio
-pybloom python-bloomfilter
-pybridge pybridge
-pybtex pybtex
-pybugz bugz
-pychecker pychecker
-pychess pychess
-pychm python-chm
-pycrypto python-crypto
-pydicom python-dicom
-pydns python-dns
-pyenchant python-enchant
-pyepr python-epr
-pyfacebook python-facebook
-pyflakes pyflakes
-pygdchart python-gdchart2
-pygopherd pygopherd
-pygpgme python-gpgme
-pygpiv python-gpiv
-pygrib python-grib
-pyliblo python-liblo
-pyliblzma python-lzma
-pylibpcap python-libpcap
-pylint pylint
-pylogsparser python-logsparser
-pymecavideo python-mecavideo
-pymilter python-milter
-pymol pymol
-pymucipher python-museek
-pymvpa python-mvpa
-pymvpa2 python-mvpa2
-pyneighborhood pyneighborhood
-pynids python-nids
-pynifti python-nifti
-pyogg python-ogg
-pyp pyp
-pyparallel python-parallel
-pyppd pyppd
-pyprompter pyprompter
-pyremctl python-remctl
-pyrit pyrit
-pyrite_publisher pyrite-publisher
-pysane python-imaging-sane
-pysatellites python-satellites
-pyserial python-serial
-pysnmp python-pysnmp4
-pysnmp_apps python-pysnmp4-apps
-pysnmp_mibs python-pysnmp4-mibs
-pysparse python-sparse
-pyspf python-spf
-pyspi python-at-spi
-pysqlite python-pysqlite1.1
-pystatgrab python-statgrab
-pysubnettree python-subnettree
-pysurfer python-surfer
-pytagsfs pytagsfs
-pytcpwrap python-tcpwrap
-python2_biggles python-pybiggles
-python_djvulibre python-djvu
-python_e_dbus python-edbus
-python_graph_core python-pygraph
-python_graph_dot python-pygraph
-python_libgearman python-gearman.libgearman
-python_libpisock python-pisock
-python_logging_extra python-loggingx
-python_memcached python-memcache
-python_policyd_spf postfix-policyd-spf-python
-python_yapps yapps2
-pythontracer pythontracer
-pytidylib python-tidylib
-pytimechart pytimechart
-pytrainer pytrainer
-pytz python-tz
-pyusb python-usb
-pyweblib python-weblib
-pyxdg python-xdg
-pyzmq python-zmq
-pyzor pyzor
-qbzr qbzr
-qct qct
-qmtest qmtest
-qpid_python python-qpid
-qpid_qmf python-qpid-extras-qmf
-qpid_tools qpid-tools
-quisk quisk
-quodlibet exfalso
-qweborf qweborf
-rabbitvcs rabbitvcs-core
-radiotray radiotray
-ranger ranger
-rapid_spring rapid-spring
-rawdog rawdog
-rdiff_backup rdiff-backup
-rebuildd rebuildd
-recaptcha_client python-recaptcha
-relational_gui relational
-relational_pyside relational
-relational_readline relational-cli
-remuco remuco-base
-repoze.what.plugins.sql python-repoze.what-plugins
-repoze.what.plugins.xml python-repoze.what-plugins
-repoze.what_pylons python-repoze.what-plugins
-repoze.what_quickstart python-repoze.what-plugins
-repoze.who.plugins.ldap python-repoze.who-plugins
-repoze.who.plugins.openid python-repoze.who-plugins
-repoze.who.plugins.sa python-repoze.who-plugins
-repoze.who_friendlyform python-repoze.who-plugins
-repoze.who_testutil python-repoze.who-plugins
-roundup roundup
-rpl rpl
-rst2pdf rst2pdf
-rubber rubber
-salt salt-common
-scikit_learn python-sklearn
-scikits_image python-skimage
-screenlets screenlets
-seivot seivot
-sensitivetickets trac-sensitivetickets
-servefile servefile
-shedskin shedskin
-slapos.core slapos-client
-slimit slimit
-smart python-smartpm
-snimpy snimpy
-spambayes spambayes
-spectacle spectacle
-specto specto
-sphinxcontrib_actdiag python-sphinxcontrib.actdiag
-sphinxcontrib_blockdiag python-sphinxcontrib.blockdiag
-sphinxcontrib_issuetracker python-sphinxcontrib.issuetracker
-sphinxcontrib_nwdiag python-sphinxcontrib.nwdiag
-sphinxcontrib_seqdiag python-sphinxcontrib.seqdiag
-sphinxcontrib_spelling python-sphinxcontrib.spelling
-spyder python-spyderlib
-sqlalchemy_migrate python-migrate
-startupmanager startupmanager
-stgit stgit
-summain summain
-supervisor supervisor
-supybot supybot
-svnmailer svnmailer
-synaptiks kde-config-touchpad
-tailor tailor
-targetcli targetcli
-tcm lio-utils
-tcosconfig tcosconfig
-tegaki_pygtk python-tegaki-gtk
-tegaki_python python-tegaki
-tegaki_tools python-tegakitools
-tegaki_train tegaki-train
-tgext.crud python-tgext.admin
-tilelite tilelite
-tinyeartrainer tinyeartrainer
-tortoisehg tortoisehg
-transifex_client transifex-client
-translate_toolkit translate-toolkit
-trash_cli trash-cli
-trimage trimage
-tritium tritium
-tryton tryton-client
-trytond tryton-server
-trytond_account tryton-modules-account
-trytond_account_be tryton-modules-account-be
-trytond_account_de_skr03 tryton-modules-account-de-skr03
-trytond_account_invoice tryton-modules-account-invoice
-trytond_account_invoice_history tryton-modules-account-invoice-history
-trytond_account_invoice_line_standalone tryton-modules-account-invoice-line-standalone
-trytond_account_product tryton-modules-account-product
-trytond_account_statement tryton-modules-account-statement
-trytond_analytic_account tryton-modules-analytic-account
-trytond_analytic_invoice tryton-modules-analytic-invoice
-trytond_analytic_purchase tryton-modules-analytic-purchase
-trytond_analytic_sale tryton-modules-analytic-sale
-trytond_calendar tryton-modules-calendar
-trytond_calendar_classification tryton-modules-calendar-classification
-trytond_calendar_scheduling tryton-modules-calendar-scheduling
-trytond_calendar_todo tryton-modules-calendar-todo
-trytond_company tryton-modules-company
-trytond_company_work_time tryton-modules-company-work-time
-trytond_country tryton-modules-country
-trytond_currency tryton-modules-currency
-trytond_dashboard tryton-modules-dashboard
-trytond_google_maps tryton-modules-google-maps
-trytond_ldap_authentication tryton-modules-ldap-authentication
-trytond_ldap_connection tryton-modules-ldap-connection
-trytond_party tryton-modules-party
-trytond_party_siret tryton-modules-party-siret
-trytond_party_vcarddav tryton-modules-party-vcarddav
-trytond_product tryton-modules-product
-trytond_product_cost_fifo tryton-modules-product-cost-fifo
-trytond_product_cost_history tryton-modules-product-cost-history
-trytond_product_price_list tryton-modules-product-price-list
-trytond_project tryton-modules-project
-trytond_project_plan tryton-modules-project-plan
-trytond_project_revenue tryton-modules-project-revenue
-trytond_purchase tryton-modules-purchase
-trytond_purchase_invoice_line_standalone tryton-modules-purchase-invoice-line-standalone
-trytond_sale tryton-modules-sale
-trytond_sale_opportunity tryton-modules-sale-opportunity
-trytond_sale_price_list tryton-modules-sale-price-list
-trytond_stock tryton-modules-stock
-trytond_stock_forecast tryton-modules-stock-forecast
-trytond_stock_inventory_location tryton-modules-stock-inventory-location
-trytond_stock_location_sequence tryton-modules-stock-location-sequence
-trytond_stock_product_location tryton-modules-stock-product-location
-trytond_stock_supply tryton-modules-stock-supply
-trytond_stock_supply_day tryton-modules-stock-supply-day
-trytond_timesheet tryton-modules-timesheet
-ttb ttb
-turpial turpial
-tw.forms python-toscawidgets
-txLibravatar python-twisted-libravatar
-ubuntu_dev_tools ubuntu-dev-tools
-ufw ufw
-unattended_upgrades unattended-upgrades
-unittest_xml_reporting python-xmlrunner
-urlscan urlscan
-vamos undertaker
-vboxapi virtualbox
-virtaal virtaal
-virtinst virtinst
-virtualbricks virtualbricks
-virtualenvwrapper virtualenvwrapper
-wammu wammu
-web.py python-webpy
-weboob python-weboob-core
-whyteboard whyteboard
-wikipediafs wikipediafs
-winpdb winpdb
-wxPython_common python-wxgtk2.8
-wxgeometrie wxgeometrie
-xgflib xgridfit
-xml_marshaller python-xmlmarshaller
-xmldiff xmldiff
-xmms2tray xmms2tray
-yagtd yagtd
-yokadi yokadi
-yum_metadata_parser python-sqlitecachec
-zenmap zenmap
-zeroinstall_injector zeroinstall-injector
-zim zim
-zinnia_python python-zinnia
diff --git a/pydist/generate_fallback_list.py b/pydist/generate_fallback_list.py
deleted file mode 100755
index ee2667d40a2c1027c5536de9ef527a4fd1f3f749..0000000000000000000000000000000000000000
--- a/pydist/generate_fallback_list.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#! /usr/bin/python
-# -*- coding: UTF-8 -*-
-# Copyright © 2010 Piotr Ożarowski <piotr@debian.org>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-import os
-import sys
-from subprocess import Popen, PIPE
-
-skip_sensible_names = True if '--skip-sensible-names' in sys.argv else False
-os.chdir(os.path.dirname(__file__))
-if os.path.isdir('../debpython'):
-    sys.path.append('..')
-else:
-    sys.path.append('/usr/share/python/debpython/')
-from debpython.pydist import sensible_pname
-
-
-if not os.path.isdir('cache'):
-    process = Popen('apt-file -s sources.list -c cache update', shell=True)
-    process.communicate()
-    if process.returncode != 0:
-        sys.stderr.write('Cannot download APT data files')
-        exit(1)
-
-# find .egg-info files/directories
-process = Popen('apt-file -s sources.list -c cache find -x '
-                '"/usr/((share/pyshared)|(lib/python2\.[0-9]/((site)|(dist))-packages)|(share/python-support/[^/]+))/[^/]*\.egg-info"',
-                shell=True, stdout=PIPE)
-stdout, stderr = process.communicate()
-if process.returncode != 0:
-    sys.stderr.write('Cannot find packages with Egg metadata')
-    exit(2)
-
-processed = set()
-result = []
-for line in stdout.splitlines():
-    pname, path = line.split(': ', 1)
-    if pname == 'python-setuptools':
-        continue
-    egg_name = [i.split('-', 1)[0] for i in path.split('/')\
-                if i.endswith('.egg-info')][0]
-    if egg_name.endswith('.egg'):
-        egg_name = egg_name[:-4]
-    if skip_sensible_names and sensible_pname(egg_name) == pname:
-        continue
-    if egg_name not in processed:
-        processed.add(egg_name)
-        result.append("%s %s\n" % (egg_name, pname))
-        #result.append("%s %s\t%s\n" % (egg_name, pname, path))
-
-result.sort()
-fp = open('dist_fallback', 'w')
-fp.write('python python\n')
-fp.write('setuptools python-pkg-resources\n')
-fp.write('wsgiref python (>= 2.5) | python-wsgiref\n')
-fp.write('argparse python (>= 2.7) | python-argparse\n')
-# wasn't recognized due to .pth file (egg-info is in PIL/ and not in *-packages/)
-fp.write('pil python-imaging\n')
-fp.writelines(result)
diff --git a/pydist/sources.list b/pydist/sources.list
deleted file mode 100644
index 370b5440f11078b7ffeabc635ceaf6ac26495d3b..0000000000000000000000000000000000000000
--- a/pydist/sources.list
+++ /dev/null
@@ -1,2 +0,0 @@
-deb http://ftp.debian.org/debian/ unstable main
-deb-src http://ftp.debian.org/debian/ unstable main
diff --git a/python2.pm b/python2.pm
deleted file mode 100644
index 08d84a4324f6ba2335a02c92b5f55f0c359f43fa..0000000000000000000000000000000000000000
--- a/python2.pm
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /usr/bin/perl
-# debhelper sequence file for dh_python2
-
-use warnings;
-use strict;
-use Debian::Debhelper::Dh_Lib;
-
-insert_before("dh_installinit", "dh_python2");
-remove_command("dh_pycentral");
-remove_command("dh_pysupport");
-
-1
diff --git a/tests/Makefile b/tests/Makefile
deleted file mode 100644
index 224dca259cb590a2bc2d6c16d6d470a21fefaf73..0000000000000000000000000000000000000000
--- a/tests/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/make -f
-
-# enable or disable tests here:
-TESTS := test1 test2 test3 test4 test5 test6 test7
-
-all: $(TESTS)
-
-test%:
-	make -C t$* run
-	make -C t$* check
-
-clean-test%:
-	make -C t$* clean
-
-clean: $(TESTS:%=clean-%)
-	rm -f *\.dsc *\.tar\.gz *\.build *\.changes *\.deb
-	@find . -prune -name '*.egg-info' -exec rm -rf '{}' ';' || true
-
-.PHONY: clean
diff --git a/tests/common.mk b/tests/common.mk
deleted file mode 100644
index e0aef03f6aeec2c3caa6bd374096c8deeb68ad5d..0000000000000000000000000000000000000000
--- a/tests/common.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/make -f
-
-export DEBPYTHON_DEFAULT ?= $(shell sed -rne 's,^default-version = python(.*),\1,p' ../../debian/debian_defaults)
-export DEBPYTHON_SUPPORTED ?= $(shell sed -rne '/^supported-versions/{s/^supported-versions = (.*)/\1/g;s/python//gp}' ../../debian/debian_defaults)
-
-all: run check
-
-run: clean
-	dpkg-buildpackage -b -us -uc
-
-clean-common:
-	./debian/rules clean
diff --git a/tests/t1/Makefile b/tests/t1/Makefile
deleted file mode 100644
index 67bf3a46f9cac884f7f36395df711c373b84f3bd..0000000000000000000000000000000000000000
--- a/tests/t1/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/make -f
-
-include ../common.mk
-DPY=$(DEBPYTHON_DEFAULT)
-
-check:
-	grep -q "Depends: .*python-mako" debian/python-foo/DEBIAN/control
-	grep -q 'python-foo (>= 2:0.1~rc2)' debian/python-foo/DEBIAN/control
-ifneq (,$(findstring 2.6,$(DEBPYTHON_SUPPORTED)))
-	test -f debian/python-foo/usr/lib/python2.6/dist-packages/foo/__init__.py
-endif
-	test ! -f debian/python-foo/usr/lib/python2.6/dist-packages/foo/spam.py
-	grep -q "Depends: .*python (<<" debian/python-foo/DEBIAN/control
-	[ "`readlink debian/python-foo/usr/lib/python$(DPY)/dist-packages/foo/absolute_link_to_tmp`" = "/tmp" ]
-	[ "`readlink debian/python-foo/usr/lib/python$(DPY)/dist-packages/foo/link_to_parent_dir`" = ".." ]
-
-clean: clean-common
-	rm -rf lib/Foo.egg-info
diff --git a/tests/t1/debian/changelog b/tests/t1/debian/changelog
deleted file mode 100644
index 0f9a1683f6506f544c30b1c993ceb553dfd7d6b9..0000000000000000000000000000000000000000
--- a/tests/t1/debian/changelog
+++ /dev/null
@@ -1,5 +0,0 @@
-foo (0.1.1) unstable; urgency=low
-
-  * Initial release
-
- -- Piotr Ożarowski <piotr@debian.org>  Sat, 27 Feb 2010 20:42:17 +0100
diff --git a/tests/t1/debian/compat b/tests/t1/debian/compat
deleted file mode 100644
index ec635144f60048986bc560c5576355344005e6e7..0000000000000000000000000000000000000000
--- a/tests/t1/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/tests/t1/debian/control b/tests/t1/debian/control
deleted file mode 100644
index f408bd7b907c9ba418deea2d0d509b36d216652e..0000000000000000000000000000000000000000
--- a/tests/t1/debian/control
+++ /dev/null
@@ -1,21 +0,0 @@
-Source: foo
-Section: python
-Priority: optional
-Maintainer: Piotr Ożarowski <piotr@debian.org>
-Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: python-all
-Standards-Version: 3.9.0
-XS-Python-Version: >= 2.4
-
-Package: python-foo
-Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
-Recommends: ${python:Recommends}
-Suggests: ${python:Suggests}
-Enhances: ${python:Enhances}
-Breaks: foo,
- ${python:Breaks}
-Provides: ${python:Provides}
-XB-Python-Version: ${python:Versions}
-Description: foo to rule them all
- exemple package #1
diff --git a/tests/t1/debian/copyright b/tests/t1/debian/copyright
deleted file mode 100644
index 63829449e43c160582d21d7b484d145c0b2ac187..0000000000000000000000000000000000000000
--- a/tests/t1/debian/copyright
+++ /dev/null
@@ -1,2 +0,0 @@
-The Debian packaging is © 2010, Piotr Ożarowski <piotr@debian.org> and
-is licensed under the MIT License.
diff --git a/tests/t1/debian/pydist-overrides b/tests/t1/debian/pydist-overrides
deleted file mode 100644
index 6957b0b2b4c018f0ff1e4442d0a41810ef437d89..0000000000000000000000000000000000000000
--- a/tests/t1/debian/pydist-overrides
+++ /dev/null
@@ -1,5 +0,0 @@
-Mako python-mako (>= 0.2)
-SQLAlchemy python-sqlalchemy (>= 0.6)
-Foo python-foo; PEP386 s/^/2:/
-Bar python-bar
-Baz
diff --git a/tests/t1/debian/python-foo.pyinstall b/tests/t1/debian/python-foo.pyinstall
deleted file mode 100644
index 0a369c395c89314f10730a639d125288cc425e1b..0000000000000000000000000000000000000000
--- a/tests/t1/debian/python-foo.pyinstall
+++ /dev/null
@@ -1 +0,0 @@
-debian/spam.py foo 2.5-
diff --git a/tests/t1/debian/python-foo.pyremove b/tests/t1/debian/python-foo.pyremove
deleted file mode 100644
index e30c5852b33780e50734469ee825b89fb0d0eadd..0000000000000000000000000000000000000000
--- a/tests/t1/debian/python-foo.pyremove
+++ /dev/null
@@ -1,2 +0,0 @@
-foo/spam.py 2.6
-foo/bar 2.7-
diff --git a/tests/t1/debian/rules b/tests/t1/debian/rules
deleted file mode 100755
index d0cc758aa34fc272f2002beca4ab660fb0966ed8..0000000000000000000000000000000000000000
--- a/tests/t1/debian/rules
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/make -f
-%:
-	dh $@ --buildsystem=python_distutils
-
-override_dh_pysupport:
-	find debian/ -name jquery.js -exec \
-	ln -fs /usr/share/javascript/jquery/jquery.js '{}' \;
-	find debian/ -name foo -type d -exec \
-	ln -s /tmp/ '{}/absolute_link_to_tmp' \;
-	find debian/ -name foo -type d -exec \
-	ln -s .. '{}/link_to_parent_dir' \;
-	DH_VERBOSE=1 ../../dh_python2\
-		--depends 'SQLAlchemy >= 0.6.1'\
-		--recommends Mako\
-		--suggests 'Foo >= 0.1rc2'\
-		--suggests 'bar >= 1.0'
diff --git a/tests/t1/debian/source/format b/tests/t1/debian/source/format
deleted file mode 100644
index 89ae9db8f88b823b6a7eabf55e203658739da122..0000000000000000000000000000000000000000
--- a/tests/t1/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (native)
diff --git a/tests/t1/debian/spam.py b/tests/t1/debian/spam.py
deleted file mode 100644
index ac65b39840cc91fe66843101ab5d792f61800fa5..0000000000000000000000000000000000000000
--- a/tests/t1/debian/spam.py
+++ /dev/null
@@ -1 +0,0 @@
-print 'SPAM'
diff --git a/tests/t1/lib/foo/__init__.py b/tests/t1/lib/foo/__init__.py
deleted file mode 100644
index 9df03f8dfacf5b420681cce4010421952786815c..0000000000000000000000000000000000000000
--- a/tests/t1/lib/foo/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-print("you just imported foo from %s" % __file__)
diff --git a/tests/t1/lib/foo/bar/__init__.py b/tests/t1/lib/foo/bar/__init__.py
deleted file mode 100644
index 669df66a72e8c890ef879e45bfcd1c1f773e1824..0000000000000000000000000000000000000000
--- a/tests/t1/lib/foo/bar/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-print("you just imported foo.bar from %s" % __file__)
diff --git a/tests/t1/lib/foo/baz.py b/tests/t1/lib/foo/baz.py
deleted file mode 100644
index 934dcfe149ff36ac647c4fa8edc6ad7c66e9c372..0000000000000000000000000000000000000000
--- a/tests/t1/lib/foo/baz.py
+++ /dev/null
@@ -1 +0,0 @@
-print("you just imported foo.baz from %s" % __file__)
diff --git a/tests/t1/lib/foo/jquery.js b/tests/t1/lib/foo/jquery.js
deleted file mode 120000
index b77fd8640ff1dccb994431670a5ca80f6f707027..0000000000000000000000000000000000000000
--- a/tests/t1/lib/foo/jquery.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/jquery/jquery.js
\ No newline at end of file
diff --git a/tests/t1/setup.py b/tests/t1/setup.py
deleted file mode 100644
index ee9f359064128ce04708dd699c8a2f671a318ce9..0000000000000000000000000000000000000000
--- a/tests/t1/setup.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /usr/bin/python
-# -*- coding: UTF-8 -*-
-try:
-    from setuptools import setup, find_packages
-except ImportError:
-    exit()
-
-setup(name='Foo',
-      version=0.1,
-      description="Foo to rule them all",
-      long_description="TODO",
-      keywords='foo bar baz',
-      author='Piotr Ożarowski',
-      author_email='piotr@debian.org',
-      url='http://www.debian.org/',
-      license='MIT',
-      package_dir={'': 'lib'},
-      packages=find_packages('lib/'),
-      package_data = {'foo': ['jquery.js']},
-      zip_safe=False,
-      install_requires = ['Mako', 'SQLAlchemy >=0.5', 'Baz [extras]'],
-)
diff --git a/tests/t2/Makefile b/tests/t2/Makefile
deleted file mode 100644
index c52a68f9ba1df584a2ea9fe7c300ef1ab85a7e77..0000000000000000000000000000000000000000
--- a/tests/t2/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/make -f
-
-include ../common.mk
-DPY=$(DEBPYTHON_DEFAULT)
-clean: clean-common
-
-check:
-	test -f debian/python-foo/usr/lib/python$(DPY)/dist-packages/foo.py
-	test -f debian/python-foo/usr/lib/python$(DPY)/dist-packages/bar/bar.py
-	grep -q pycompile debian/python-foo/DEBIAN/postinst
-	grep -q pyclean debian/python-foo/DEBIAN/prerm
diff --git a/tests/t2/__init__.py b/tests/t2/__init__.py
deleted file mode 100644
index 4c966637ad0f571d2b8775260fa142aff4971cca..0000000000000000000000000000000000000000
--- a/tests/t2/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-print("I'm __init__.py")
diff --git a/tests/t2/bar.py b/tests/t2/bar.py
deleted file mode 100644
index f64f1236298b2861db4c21498c19ae92cb22461d..0000000000000000000000000000000000000000
--- a/tests/t2/bar.py
+++ /dev/null
@@ -1 +0,0 @@
-print("I'm bar")
diff --git a/tests/t2/debian/changelog b/tests/t2/debian/changelog
deleted file mode 100644
index 0f9a1683f6506f544c30b1c993ceb553dfd7d6b9..0000000000000000000000000000000000000000
--- a/tests/t2/debian/changelog
+++ /dev/null
@@ -1,5 +0,0 @@
-foo (0.1.1) unstable; urgency=low
-
-  * Initial release
-
- -- Piotr Ożarowski <piotr@debian.org>  Sat, 27 Feb 2010 20:42:17 +0100
diff --git a/tests/t2/debian/compat b/tests/t2/debian/compat
deleted file mode 100644
index ec635144f60048986bc560c5576355344005e6e7..0000000000000000000000000000000000000000
--- a/tests/t2/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/tests/t2/debian/control b/tests/t2/debian/control
deleted file mode 100644
index 84f434f42cbb33c68f78c5af749e282e17e84b63..0000000000000000000000000000000000000000
--- a/tests/t2/debian/control
+++ /dev/null
@@ -1,18 +0,0 @@
-Source: foo
-Section: python
-Priority: optional
-Maintainer: Piotr Ożarowski <piotr@debian.org>
-Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: python-all
-Standards-Version: 3.9.1
-XS-Python-Version: >= 2.1
-
-Package: python-foo
-Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
-Recommends: ${python:Recommends}
-Suggests: ${python:Suggests}
-Enhances: ${python:Enhances}
-Breaks: ${python:Breaks}
-Description: foo to rule them all
- exemple package #2
diff --git a/tests/t2/debian/copyright b/tests/t2/debian/copyright
deleted file mode 100644
index 63829449e43c160582d21d7b484d145c0b2ac187..0000000000000000000000000000000000000000
--- a/tests/t2/debian/copyright
+++ /dev/null
@@ -1,2 +0,0 @@
-The Debian packaging is © 2010, Piotr Ożarowski <piotr@debian.org> and
-is licensed under the MIT License.
diff --git a/tests/t2/debian/install b/tests/t2/debian/install
deleted file mode 100644
index e3e06e3e1f6f841abdb4fb059c106e7940c4fbf0..0000000000000000000000000000000000000000
--- a/tests/t2/debian/install
+++ /dev/null
@@ -1,3 +0,0 @@
-foo.py /usr/share/pyshared/
-__init__.py /usr/share/pyshared/bar/
-bar.py /usr/share/pyshared/bar/
diff --git a/tests/t2/debian/rules b/tests/t2/debian/rules
deleted file mode 100755
index 0b2b58b2cf8f24be95932af9135995f079c645ab..0000000000000000000000000000000000000000
--- a/tests/t2/debian/rules
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/make -f
-%:
-	dh $@ --buildsystem=python_distutils
-
-override_dh_pysupport:
-	DH_VERBOSE=1 ../../dh_python2
-
-clean:
-	dh_clean
diff --git a/tests/t2/debian/source/format b/tests/t2/debian/source/format
deleted file mode 100644
index 89ae9db8f88b823b6a7eabf55e203658739da122..0000000000000000000000000000000000000000
--- a/tests/t2/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (native)
diff --git a/tests/t2/foo.py b/tests/t2/foo.py
deleted file mode 100644
index 8e4dd8e1cff87eb8bcf2714b5a659e2e88fa69cf..0000000000000000000000000000000000000000
--- a/tests/t2/foo.py
+++ /dev/null
@@ -1 +0,0 @@
-print("I'm foo")
diff --git a/tests/t2/setup.py b/tests/t2/setup.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/t3/Makefile b/tests/t3/Makefile
deleted file mode 100644
index 21658b4736062f4459c2e898224a9ed3aedcf5c7..0000000000000000000000000000000000000000
--- a/tests/t3/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/make -f
-
-include ../common.mk
-DPY=$(DEBPYTHON_DEFAULT)
-
-check:
-	grep -q "pycompile -p python-foo /usr/lib/python-foo -V $(DPY)"\
-		debian/python-foo/DEBIAN/postinst
-	test -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/bar.so
-	test ! -f debian/python-foo/usr/share/pyshared/foo/bar.so
-	test -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/spam.so
-	test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/spam.so.0.1
-	test -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/baz.so
-	test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1
-	test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1.2
-	test -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so
-	test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0
-	test ! -L debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0
-	test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0.0.0
-
-clean: clean-common
-	rm -rf lib/Foo.egg-info build
diff --git a/tests/t3/debian/changelog b/tests/t3/debian/changelog
deleted file mode 100644
index d91e7a7d7ef8b1397b343936897fc3d25c5b5ceb..0000000000000000000000000000000000000000
--- a/tests/t3/debian/changelog
+++ /dev/null
@@ -1,5 +0,0 @@
-foo (0.1.1) unstable; urgency=low
-
-  * Initial release
-
- -- Piotr Ożarowski <piotr@debian.org>  Sun, 19 Dec 2010 19:40:33 +0100
diff --git a/tests/t3/debian/compat b/tests/t3/debian/compat
deleted file mode 100644
index ec635144f60048986bc560c5576355344005e6e7..0000000000000000000000000000000000000000
--- a/tests/t3/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/tests/t3/debian/control b/tests/t3/debian/control
deleted file mode 100644
index c4e1f5f9836bafa82cff2fe0ac33bb1078f49431..0000000000000000000000000000000000000000
--- a/tests/t3/debian/control
+++ /dev/null
@@ -1,19 +0,0 @@
-Source: foo
-Section: python
-Priority: optional
-Maintainer: Piotr Ożarowski <piotr@debian.org>
-Build-Depends: debhelper (>= 7.0.50~), python-all-dev
-Standards-Version: 3.9.1
-X-Python-Version: >= 2.6
-
-Package: python-foo
-Architecture: any
-Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
-Recommends: ${python:Recommends}
-Suggests: ${python:Suggests}
-Enhances: ${python:Enhances}
-Breaks: ${python:Breaks}
-Provides: ${python:Provides}
-XB-Python-Version: ${python:Versions}
-Description: foo to rule them all
- exemple package #3 - Python extension
diff --git a/tests/t3/debian/copyright b/tests/t3/debian/copyright
deleted file mode 100644
index 63829449e43c160582d21d7b484d145c0b2ac187..0000000000000000000000000000000000000000
--- a/tests/t3/debian/copyright
+++ /dev/null
@@ -1,2 +0,0 @@
-The Debian packaging is © 2010, Piotr Ożarowski <piotr@debian.org> and
-is licensed under the MIT License.
diff --git a/tests/t3/debian/install b/tests/t3/debian/install
deleted file mode 100644
index 380db416caf74384dede5d56c9782ad7c18bc40a..0000000000000000000000000000000000000000
--- a/tests/t3/debian/install
+++ /dev/null
@@ -1,2 +0,0 @@
-# private module in architecture dependent dir
-lib/foo.py /usr/lib/python-foo/
diff --git a/tests/t3/debian/rules b/tests/t3/debian/rules
deleted file mode 100755
index 7ce8185d47449d80e95288252750db6995cbfe3b..0000000000000000000000000000000000000000
--- a/tests/t3/debian/rules
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/make -f
-DPY=$(shell PYTHONPATH=../../ python -c 'import debpython.version as v; print(v.vrepr(v.DEFAULT))')
-%:
-	dh $@ --buildsystem=python_distutils
-
-override_dh_pysupport:
-	# install also as private extension
-	dh_install debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/bar.so \
-		/usr/lib/python-foo/
-	# ... and under versioned name with a symlink
-	cp debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/bar.so \
-	   debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/spam.so.0
-	dh_link /usr/lib/python${DPY}/dist-packages/foo/spam.so.0 \
-		/usr/lib/python${DPY}/dist-packages/foo/spam.so
-	# ... and with multiple symlinks
-	cp debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/bar.so \
-	   debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1.2
-	dh_link /usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1.2 \
-		/usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1
-	dh_link /usr/lib/python${DPY}/dist-packages/foo/baz.so.0.1 \
-		/usr/lib/python${DPY}/dist-packages/foo/baz.so
-	# ... second style of multiple symlinks
-	cp debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/bar.so \
-	   debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0.0.0
-	dh_link /usr/lib/python${DPY}/dist-packages/foo/quux.so.0.0.0 \
-		/usr/lib/python${DPY}/dist-packages/foo/quux.so.0
-	dh_link /usr/lib/python${DPY}/dist-packages/foo/quux.so.0.0.0 \
-		/usr/lib/python${DPY}/dist-packages/foo/quux.so
-	# ... and complex multiple symlinks
-	DH_VERBOSE=1 ../../dh_python2
diff --git a/tests/t3/debian/source/format b/tests/t3/debian/source/format
deleted file mode 100644
index 89ae9db8f88b823b6a7eabf55e203658739da122..0000000000000000000000000000000000000000
--- a/tests/t3/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (native)
diff --git a/tests/t3/lib/__init__.py b/tests/t3/lib/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/t3/lib/bar.c b/tests/t3/lib/bar.c
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/t3/lib/foo.py b/tests/t3/lib/foo.py
deleted file mode 100644
index 11c51ef4ceb7b5fab75c7c076af274bc32e4b8a1..0000000000000000000000000000000000000000
--- a/tests/t3/lib/foo.py
+++ /dev/null
@@ -1,5 +0,0 @@
-import foo.bar
-
-class Foo(object):
-    def __init__(self):
-        pass
diff --git a/tests/t3/setup.py b/tests/t3/setup.py
deleted file mode 100755
index 4835818420ea65f889bac89f84e6d36bfff6a973..0000000000000000000000000000000000000000
--- a/tests/t3/setup.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-from distutils.core import setup, Extension
-setup(name="distutils-test",
-      version = "0.1",
-      author="jbailey",
-      author_email="jbailey@debian.org",
-      url="http://www.python.org/sigs/distutils-sig/",
-      ext_modules=[Extension('foo/bar', ['lib/bar.c'])],
-      #py_modules=['package'],
-      packages = ["foo"],
-      package_dir = {'foo': 'lib'}
-     )
-
diff --git a/tests/t4/Makefile b/tests/t4/Makefile
deleted file mode 100644
index 46ddc595d2c83134b9561b772da4c44147c8f8a6..0000000000000000000000000000000000000000
--- a/tests/t4/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/make -f
-
-include ../common.mk
-clean: clean-common
-
-check:
-	grep -q python2.6 debian/foo/usr/share/foo/foo.py
-ifneq (,$(findstring 2.6,$(DEBPYTHON_SUPPORTED)))
-	grep -q Depends:.*python2.6 debian/foo/DEBIAN/control
-endif
-	#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
-	test ! -x debian/foo/usr/share/foo/baz.py
-	grep -q Depends:.*python2.4 debian/foo/DEBIAN/control && false || true
diff --git a/tests/t4/bar.py b/tests/t4/bar.py
deleted file mode 100755
index 707570e1591273b7117859ad55a2edc61e1e7121..0000000000000000000000000000000000000000
--- a/tests/t4/bar.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/python2.5
-print("I'm bar")
diff --git a/tests/t4/baz.py b/tests/t4/baz.py
deleted file mode 100644
index 8a52e9e2d554d284a14ad3886f2faeab7024dae3..0000000000000000000000000000000000000000
--- a/tests/t4/baz.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/python2.4
-print("I'm baz - not executable")
diff --git a/tests/t4/debian/changelog b/tests/t4/debian/changelog
deleted file mode 100644
index 0f9a1683f6506f544c30b1c993ceb553dfd7d6b9..0000000000000000000000000000000000000000
--- a/tests/t4/debian/changelog
+++ /dev/null
@@ -1,5 +0,0 @@
-foo (0.1.1) unstable; urgency=low
-
-  * Initial release
-
- -- Piotr Ożarowski <piotr@debian.org>  Sat, 27 Feb 2010 20:42:17 +0100
diff --git a/tests/t4/debian/compat b/tests/t4/debian/compat
deleted file mode 100644
index ec635144f60048986bc560c5576355344005e6e7..0000000000000000000000000000000000000000
--- a/tests/t4/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/tests/t4/debian/control b/tests/t4/debian/control
deleted file mode 100644
index fbfc9fdd6dc194f2c9aec6ebe9d45b8caa5b89ba..0000000000000000000000000000000000000000
--- a/tests/t4/debian/control
+++ /dev/null
@@ -1,16 +0,0 @@
-Source: foo
-Section: misc
-Priority: optional
-Maintainer: Piotr Ożarowski <piotr@debian.org>
-Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: python
-Standards-Version: 3.9.1
-
-Package: foo
-Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
-Recommends: ${python:Recommends}
-Suggests: ${python:Suggests}
-Enhances: ${python:Enhances}
-Description: example 4 - private directory
- exemple package #4 - private directory
diff --git a/tests/t4/debian/copyright b/tests/t4/debian/copyright
deleted file mode 100644
index 69cea758e6ab12db36e1b482bbe3c0b15ba79d83..0000000000000000000000000000000000000000
--- a/tests/t4/debian/copyright
+++ /dev/null
@@ -1,2 +0,0 @@
-The Debian packaging is © 2011, Piotr Ożarowski <piotr@debian.org> and
-is licensed under the MIT License.
diff --git a/tests/t4/debian/install b/tests/t4/debian/install
deleted file mode 100644
index a589a0cb873766a03c42ab921fcd649ac2b60b07..0000000000000000000000000000000000000000
--- a/tests/t4/debian/install
+++ /dev/null
@@ -1,3 +0,0 @@
-foo.py /usr/share/foo/
-bar.py /usr/share/bar/
-baz.py /usr/share/foo/
diff --git a/tests/t4/debian/rules b/tests/t4/debian/rules
deleted file mode 100755
index 29b03405eeb477aaf67100f3cd6f3f6d5979e045..0000000000000000000000000000000000000000
--- a/tests/t4/debian/rules
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/make -f
-%:
-	dh $@ --buildsystem=python_distutils
-
-override_dh_pysupport:
-	DH_VERBOSE=1 ../../dh_python2
-	DH_VERBOSE=1 ../../dh_python2 /usr/share/bar
-
-clean:
-	dh_clean
diff --git a/tests/t4/debian/source/format b/tests/t4/debian/source/format
deleted file mode 100644
index 89ae9db8f88b823b6a7eabf55e203658739da122..0000000000000000000000000000000000000000
--- a/tests/t4/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (native)
diff --git a/tests/t4/foo.py b/tests/t4/foo.py
deleted file mode 100755
index d679d96790fe7a23e101e4afb7a7ad1f0efa7c1a..0000000000000000000000000000000000000000
--- a/tests/t4/foo.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/python2.6
-print("I'm foo")
diff --git a/tests/t4/setup.py b/tests/t4/setup.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/t5/Makefile b/tests/t5/Makefile
deleted file mode 100644
index f5f4fe15592499c24f1b2ddc3678631d6aef4ecb..0000000000000000000000000000000000000000
--- a/tests/t5/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/make -f
-
-include ../common.mk
-clean: clean-common
-
-check:
-	# test dh_python2
-	test -f debian/python-foo/usr/share/pyshared/keep_this_one/__init__.py
-	test ! -f debian/python-foo/usr/share/pyshared/remove_this_one/__init__.py
-	test ! -f debian/python-foo/usr/share/pyshared/foo/__init__.py
-	grep -q remove_this_one debian/python-foo/usr/share/python/ns/python-foo
-	grep -q foo debian/python-foo/usr/share/python/ns/python-foo
-	grep -q bar.baz debian/python-foo/usr/share/python/ns/python-foo
-	grep -q keep_this_one debian/python-foo/usr/share/python/ns/python-foo && false || true
-	grep -q "pycompile -p python-foo" debian/python-foo/DEBIAN/postinst
-	grep -q "pyclean -p python-foo" debian/python-foo/DEBIAN/prerm
-	# test pycompile
-	DESTDIR=debian/python-foo/ ../../pycompile -v debian/python-foo/usr/lib/
-	set -e; for i in remove_this_one bar bar/baz;\
-	do [ "`ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.py | wc -l`" != '0' ];\
-	[ "`ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.pyc | wc -l`" != '0' ];\
-	done
-	# test pyclean
-	DESTDIR=debian/python-foo/ ../../pyclean -v debian/python-foo/usr/lib/
-	set -e; for i in remove_this_one bar bar/baz;\
-	do [ "`ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.py 2>/dev/null || true | wc -l`" = 0 ];\
-	[ "`ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.pyc 2>/dev/null || true | wc -l`" = 0 ];\
-	done
diff --git a/tests/t5/debian/changelog b/tests/t5/debian/changelog
deleted file mode 100644
index ed64803975d4bfbf4ea08d5f4750a539bfb685fb..0000000000000000000000000000000000000000
--- a/tests/t5/debian/changelog
+++ /dev/null
@@ -1,5 +0,0 @@
-foo (0.1.1) unstable; urgency=low
-
-  * Initial release
-
- -- Piotr Ożarowski <piotr@debian.org>  Sun, 27 Mar 2011 21:09:27 +0200
diff --git a/tests/t5/debian/compat b/tests/t5/debian/compat
deleted file mode 100644
index ec635144f60048986bc560c5576355344005e6e7..0000000000000000000000000000000000000000
--- a/tests/t5/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/tests/t5/debian/control b/tests/t5/debian/control
deleted file mode 100644
index 1f31b90e5cb9f71979584c31bde32c2f0573199d..0000000000000000000000000000000000000000
--- a/tests/t5/debian/control
+++ /dev/null
@@ -1,14 +0,0 @@
-Source: foo
-Section: python
-Priority: optional
-Maintainer: Piotr Ożarowski <piotr@debian.org>
-Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: python
-Standards-Version: 3.9.1
-
-Package: python-foo
-Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
-Description: example 5 - namespace feature
- exemple package #5 - dropping __init__.py file from binary package and
- recreating it at install time (and removing at in remove time)
diff --git a/tests/t5/debian/copyright b/tests/t5/debian/copyright
deleted file mode 100644
index 69cea758e6ab12db36e1b482bbe3c0b15ba79d83..0000000000000000000000000000000000000000
--- a/tests/t5/debian/copyright
+++ /dev/null
@@ -1,2 +0,0 @@
-The Debian packaging is © 2011, Piotr Ożarowski <piotr@debian.org> and
-is licensed under the MIT License.
diff --git a/tests/t5/debian/dirs b/tests/t5/debian/dirs
deleted file mode 100644
index b30451056589b5d76aecd95e924bb0ffef3cbff1..0000000000000000000000000000000000000000
--- a/tests/t5/debian/dirs
+++ /dev/null
@@ -1,4 +0,0 @@
-/usr/share/pyshared/bar/baz
-/usr/share/pyshared/foo.egg-info
-/usr/share/pyshared/keep_this_one
-/usr/share/pyshared/remove_this_one
diff --git a/tests/t5/debian/rules b/tests/t5/debian/rules
deleted file mode 100755
index d6695f6895ab295921ede7fed34503dece1e67fb..0000000000000000000000000000000000000000
--- a/tests/t5/debian/rules
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/make -f
-%:
-	dh $@ --buildsystem=python_distutils
-
-override_dh_auto_build:
-
-override_dh_auto_install:
-	set -e;\
-	cd debian/python-foo/usr/share/pyshared/;\
-	echo "keep_this_one\nremove_this_one" > foo.egg-info/namespace_packages.txt;\
-	echo "True" > keep_this_one/__init__.py;\
-	touch remove_this_one/__init__.py remove_this_one/foo.py bar/baz/spam.py
-
-
-override_dh_pysupport:
-	DH_VERBOSE=1 ../../dh_python2 --namespace foo --namespace bar.baz --namespace bar
-
-clean:
-	dh_clean
diff --git a/tests/t5/debian/source/format b/tests/t5/debian/source/format
deleted file mode 100644
index 89ae9db8f88b823b6a7eabf55e203658739da122..0000000000000000000000000000000000000000
--- a/tests/t5/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (native)
diff --git a/tests/t6/Makefile b/tests/t6/Makefile
deleted file mode 100644
index 0d0895095324163c26839d8ca4d71ba5f2335727..0000000000000000000000000000000000000000
--- a/tests/t6/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/make -f
-
-include ../common.mk
-clean: clean-common
-
-check:
-	# python2.4 hardcoded via `dh_python2 -V 2.4`
-	grep -q Depends:.*python2.4 debian/foo/DEBIAN/control
-	grep -q '\-V 2.4 /usr/share/baz24' debian/foo/usr/share/python/runtime.d/foo.rtupdate
-	grep -q '/usr/share/baz24 \-V 2.4' debian/foo/DEBIAN/postinst
-	# python2.5 due to X-Python-Version: 2.5
-	grep -q Depends:.*python2.5 debian/foo/DEBIAN/control
-	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
-ifneq (,$(findstring 2.6,$(DEBPYTHON_SUPPORTED)))
-	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
-endif
diff --git a/tests/t6/bar.py b/tests/t6/bar.py
deleted file mode 100755
index f1d7b7c3ea364e6c7dcb7d9729a44f7b653d49f5..0000000000000000000000000000000000000000
--- a/tests/t6/bar.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/python
-print("I'm bar")
diff --git a/tests/t6/baz.py b/tests/t6/baz.py
deleted file mode 100644
index aced459fa8549609f723752b4604e12298b4d835..0000000000000000000000000000000000000000
--- a/tests/t6/baz.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/python
-print("I'm baz")
diff --git a/tests/t6/debian/changelog b/tests/t6/debian/changelog
deleted file mode 100644
index 33f04f8f5b9c7f88b523d0e33e096439cb82d432..0000000000000000000000000000000000000000
--- a/tests/t6/debian/changelog
+++ /dev/null
@@ -1,5 +0,0 @@
-foo (0.1.1) unstable; urgency=low
-
-  * Initial release
-
- -- Piotr Ożarowski <piotr@debian.org>  Sat, 08 Oct 2011 17:13:03 +0200
diff --git a/tests/t6/debian/compat b/tests/t6/debian/compat
deleted file mode 100644
index ec635144f60048986bc560c5576355344005e6e7..0000000000000000000000000000000000000000
--- a/tests/t6/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/tests/t6/debian/control b/tests/t6/debian/control
deleted file mode 100644
index 2487e0915bc675dabdcabe0cee500c62a67ba1e1..0000000000000000000000000000000000000000
--- a/tests/t6/debian/control
+++ /dev/null
@@ -1,20 +0,0 @@
-Source: foo
-Section: misc
-Priority: optional
-Maintainer: Piotr Ożarowski <piotr@debian.org>
-Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: python
-Standards-Version: 3.9.1
-X-Python-Version: 2.5
-
-Package: foo
-Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
-Recommends: ${python:Recommends}
-Suggests: ${python:Suggests}
-Enhances: ${python:Enhances}
-Description: example 6 - private directory with hardcoded Python version
- exemple package #6 - private directories that support:
-  * python2.4 hardcoded via `dh_python2 -V 2.4`
-  * python2.5 due to X-Python-Version: 2.5
-  * python2.6 hardcoded via shebang
diff --git a/tests/t6/debian/copyright b/tests/t6/debian/copyright
deleted file mode 100644
index 69cea758e6ab12db36e1b482bbe3c0b15ba79d83..0000000000000000000000000000000000000000
--- a/tests/t6/debian/copyright
+++ /dev/null
@@ -1,2 +0,0 @@
-The Debian packaging is © 2011, Piotr Ożarowski <piotr@debian.org> and
-is licensed under the MIT License.
diff --git a/tests/t6/debian/install b/tests/t6/debian/install
deleted file mode 100644
index 12d2c11fe591adc58c1176668c7089d006f651a7..0000000000000000000000000000000000000000
--- a/tests/t6/debian/install
+++ /dev/null
@@ -1,6 +0,0 @@
-foo.py /usr/share/foo/
-spam.py /usr/share/foo/
-bar.py /usr/share/bar25/
-spam.py /usr/share/bar25/
-baz.py /usr/share/baz24/
-spam.py /usr/share/baz24/
diff --git a/tests/t6/debian/rules b/tests/t6/debian/rules
deleted file mode 100755
index c08a39034d064c80bf1b1932871b9b9dcb487e07..0000000000000000000000000000000000000000
--- a/tests/t6/debian/rules
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/make -f
-%:
-	dh $@ --buildsystem=python_distutils
-
-override_dh_pysupport:
-	DH_VERBOSE=1 ../../dh_python2
-	DH_VERBOSE=1 ../../dh_python2 /usr/share/bar25
-	DH_VERBOSE=1 ../../dh_python2 /usr/share/baz24 -V 2.4
-
-clean:
-	dh_clean
diff --git a/tests/t6/debian/source/format b/tests/t6/debian/source/format
deleted file mode 100644
index 89ae9db8f88b823b6a7eabf55e203658739da122..0000000000000000000000000000000000000000
--- a/tests/t6/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (native)
diff --git a/tests/t6/foo.py b/tests/t6/foo.py
deleted file mode 100755
index d679d96790fe7a23e101e4afb7a7ad1f0efa7c1a..0000000000000000000000000000000000000000
--- a/tests/t6/foo.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/python2.6
-print("I'm foo")
diff --git a/tests/t6/setup.py b/tests/t6/setup.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/t6/spam.py b/tests/t6/spam.py
deleted file mode 100644
index c8b0fd913f2eac9af0d025fc8dcffb2cb1429ef9..0000000000000000000000000000000000000000
--- a/tests/t6/spam.py
+++ /dev/null
@@ -1 +0,0 @@
-print('spam')
diff --git a/tests/t7/Makefile b/tests/t7/Makefile
deleted file mode 100644
index 2488496549d160aa9f792e37c97acbfb5bc4c1b9..0000000000000000000000000000000000000000
--- a/tests/t7/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/make -f
-
-include ../common.mk
-clean: clean-common
-
-check:
-	# python2.4 hardcoded via `dh_python2 -shebang ...python2.4`
-	grep -q '\-V 2.4 /usr/share/baz24' debian/foo/usr/share/python/runtime.d/foo.rtupdate
-	grep -q '/usr/share/baz24 \-V 2.4' debian/foo/DEBIAN/postinst
-	grep -q '#! /usr/bin/python2.4 -OO' debian/foo/usr/share/baz24/baz.py
-	# python2.6 hardcoded via shebang
-	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
-	# /env removed from shebang 
-	grep -q '#! /usr/bin/python' debian/foo/usr/share/bar/bar.py
-	# /local removed from shebang 
-	grep -q '#! /usr/bin/python' debian/foo/usr/share/foo/baz.py
-	grep -q '#! /usr/bin/python2.6' debian/foo/usr/share/foo/foo.py
diff --git a/tests/t7/bar.py b/tests/t7/bar.py
deleted file mode 100755
index 42a88cc1c1760b5f058ce56015da0d2de8cd7204..0000000000000000000000000000000000000000
--- a/tests/t7/bar.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env python
-"env in shebang"
diff --git a/tests/t7/baz.py b/tests/t7/baz.py
deleted file mode 100755
index 4dc3658ffa8cd2fc6cccc5fa2c515d91123fb5b1..0000000000000000000000000000000000000000
--- a/tests/t7/baz.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/local/bin/python
-"/usr/local in shebang"
diff --git a/tests/t7/debian/changelog b/tests/t7/debian/changelog
deleted file mode 100644
index c1ed13c35eb209f170684444f22203579f366bde..0000000000000000000000000000000000000000
--- a/tests/t7/debian/changelog
+++ /dev/null
@@ -1,5 +0,0 @@
-foo (1.0) unstable; urgency=low
-
-  * Initial release
-
- -- Piotr Ożarowski <piotr@debian.org>  Sun, 10 Jun 2012 14:09:45 +0200
diff --git a/tests/t7/debian/compat b/tests/t7/debian/compat
deleted file mode 100644
index ec635144f60048986bc560c5576355344005e6e7..0000000000000000000000000000000000000000
--- a/tests/t7/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/tests/t7/debian/control b/tests/t7/debian/control
deleted file mode 100644
index d14acc7fa9985afb5f2dfc098eeeb14a71870b4b..0000000000000000000000000000000000000000
--- a/tests/t7/debian/control
+++ /dev/null
@@ -1,13 +0,0 @@
-Source: foo
-Section: misc
-Priority: optional
-Maintainer: Piotr Ożarowski <piotr@debian.org>
-Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: python
-Standards-Version: 3.9.3
-
-Package: foo
-Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
-Description: example 7 - shebangs
- exemple package #7 - shebang related tests
diff --git a/tests/t7/debian/copyright b/tests/t7/debian/copyright
deleted file mode 100644
index bf78fd09d2496e08307516bc3b50a53f108d1dd0..0000000000000000000000000000000000000000
--- a/tests/t7/debian/copyright
+++ /dev/null
@@ -1,2 +0,0 @@
-The Debian packaging is © 2012, Piotr Ożarowski <piotr@debian.org> and
-is licensed under the MIT License.
diff --git a/tests/t7/debian/install b/tests/t7/debian/install
deleted file mode 100644
index ff6534256bcd85b5aef48f23c3822ac33db3ee5f..0000000000000000000000000000000000000000
--- a/tests/t7/debian/install
+++ /dev/null
@@ -1,7 +0,0 @@
-foo.py /usr/share/foo/
-baz.py /usr/share/foo/
-spam.py /usr/share/foo/
-bar.py /usr/share/bar/
-spam.py /usr/share/bar/
-baz.py /usr/share/baz24/
-spam.py /usr/share/baz24/
diff --git a/tests/t7/debian/rules b/tests/t7/debian/rules
deleted file mode 100755
index 551e9c952b011087b5a9bee08cd18fcc2eedc864..0000000000000000000000000000000000000000
--- a/tests/t7/debian/rules
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/make -f
-%:
-	dh $@ --buildsystem=python_distutils
-
-override_dh_pysupport:
-	DH_VERBOSE=1 ../../dh_python2
-	DH_VERBOSE=1 ../../dh_python2 /usr/share/bar
-	DH_VERBOSE=1 ../../dh_python2 /usr/share/baz24 --shebang '/usr/bin/python2.4 -OO'
-
-clean:
-	dh_clean
diff --git a/tests/t7/debian/source/format b/tests/t7/debian/source/format
deleted file mode 100644
index 89ae9db8f88b823b6a7eabf55e203658739da122..0000000000000000000000000000000000000000
--- a/tests/t7/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (native)
diff --git a/tests/t7/foo.py b/tests/t7/foo.py
deleted file mode 100755
index 6ea2fec7add66cbd018f5ec07e0c36a48f4c4c53..0000000000000000000000000000000000000000
--- a/tests/t7/foo.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/local/bin/python2.6
-"/usr/local/bin/python2.6 hardcoded in shebang"
diff --git a/tests/t7/setup.py b/tests/t7/setup.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/t7/spam.py b/tests/t7/spam.py
deleted file mode 100644
index c8b0fd913f2eac9af0d025fc8dcffb2cb1429ef9..0000000000000000000000000000000000000000
--- a/tests/t7/spam.py
+++ /dev/null
@@ -1 +0,0 @@
-print('spam')