Package: cdbs
Version: 0.4.87
Severity: normal
Tags: patch

Hi, as part of the Python 2.6 transition, I've been digging through the
packages that depend on python2.5. An awful lot of them do so because
they install scripts with a shebang of the form:

| #!/usr/bin/python2.5

dh works around this by building with the versioned python interpretors
first, and then the default /usr/bin/python
http://git.debian.org/?p=debhelper/debhelper.git;a=blob;f=Debian/Debhelper/Buildsystem/python_distutils.pm#l111

However distutils provides a way to force a particular shebang:
--executable

Here's a patch to pass that (by default) when building.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 465 6908 C: +27 72 419 8559  UCT: x3127
diff --git a/1/class/python-distutils.mk.in b/1/class/python-distutils.mk.in
index 267afaf..8ba232d 100644
--- a/1/class/python-distutils.mk.in
+++ b/1/class/python-distutils.mk.in
@@ -26,7 +26,7 @@ include $(_cdbs_class_path)/python-module.mk$(_cdbs_makefile_suffix)
 
 DEB_PYTHON_SETUP_CMD ?= setup.py
 DEB_PYTHON_CLEAN_ARGS ?= -a
-DEB_PYTHON_BUILD_ARGS ?= --build-base="$(CURDIR)/$(DEB_BUILDDIR)/build"
+DEB_PYTHON_BUILD_ARGS ?= --build-base="$(CURDIR)/$(DEB_BUILDDIR)/build" $(if $(cdbs_python_nondefault_version),,--executable=/usr/bin/python)
 DEB_PYTHON_INSTALL_ARGS_ALL ?= --prefix=/usr --no-compile -O0
 
 # DEB_PYTHON_MODULE_PACKAGE is deprecated.

Attachment: signature.asc
Description: Digital signature

Reply via email to