diff --git a/Makefile b/Makefile index ef627fa4ca6b0d0a7b3b3f2f7fa0785555ceb317..3faf321308ef825b5688748ea1d0e9c99d6b71f2 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,8 @@ install-dev: $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/ $(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)/bin/ + $(INSTALL) -m 755 dh_python2 $(DESTDIR)$(PREFIX)/share/python/ + $(INSTALL) -m 755 dh_python2.sh $(DESTDIR)$(PREFIX)/bin/dh_python2 $(INSTALL) -m 644 python2.pm $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/ install-runtime: diff --git a/debian/changelog b/debian/changelog index 1af34cbea2563835decf952c72ea9c0d7b5492b0..711ebcae3ebb3a8583b6dd09f22a36ebc68d3a03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,12 @@ python-defaults (2.7.5-3) UNRELEASED; urgency=low + [ Matthias Klose ] * Fix libpython-all-dbg doc dir symlink. Closes: #712270. + [ Piotr Ożarowski ] + * Replace /usr/bin/dh_python2 with a shell script that invokes + dh-python's dh_python2 if debian/control mentions dh-python + -- Matthias Klose <doko@debian.org> Mon, 17 Jun 2013 11:09:36 +0200 python-defaults (2.7.5-2) unstable; urgency=low diff --git a/dh_python2 b/dh_python2 index 911f4a72687194be7b9cf6cf91387207f56deef3..e8f4aa12c5f790a23672a33087ca7792f9ece888 100755 --- a/dh_python2 +++ b/dh_python2 @@ -32,7 +32,6 @@ 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 -sys.path.insert(1, '/usr/share/python/') from debpython.debhelper import DebHelper from debpython.depends import Dependencies from debpython.version import SUPPORTED, DEFAULT, \ diff --git a/dh_python2.sh b/dh_python2.sh new file mode 100755 index 0000000000000000000000000000000000000000..a6fd9d7d120a51ffbca5aa6adac2311c004851ef --- /dev/null +++ b/dh_python2.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +if [ -f /usr/share/dh-python/dh_python2 ] &&\ + grep -q dh-python ./debian/control 2>/dev/null +then + exec /usr/share/dh-python/dh_python2 $@ +else + exec /usr/share/python/dh_python2 $@ +fi