Your message dated Sat, 17 Apr 2010 12:24:18 -0400
with message-id <[email protected]>
and subject line fixed in debhelper 7.4.3
has caused the Debian Bug report #548392,
regarding debhelper: python_distutils buildsystem and setuptools entry_points
don't use default python
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
548392: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548392
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: debhelper
Version: 7.4.2
Severity: normal
Tags: patch
Hi,
The commonly used package python-setuptools allows developers to specify
console scripts using the entry_points keyword argument to setup() in
setup.py. For example, an executable script named 'simplepack_pyversion'
would be created using this keyword argument:
entry_points = {'console_scripts':
['my_script = my_package:main']}
Unfortunately, when run with debhelper, these scripts get created with
the wrong shebang line. I am attaching a patch and a test case.
The shebang line gets assigned by setuptools as the value of
sys.executable, which is seems OK. The trouble is that debhelper
supports multiple versions of Python by cycling through those found with
"pyversions -r" starting with the default. Using this ordering scheme,
any files installed by the default Python (and thus having shebang
/usr/bin/python) get overwritten by files installed with non-default
Pythons. The attached patch replaces the order of Pythons invoked, and
thus the default Python always comes last.
The demonstration script will create a very simple package that
demonstrates the problem. Before the patch on Debian unstable, the
output of the last command in the patch is "#!/usr/bin/python2.4". With
the patch, the output of the last command is "#!/usr/bin/python".
-Andrew
>From d7dbb345f4c17aeea8fd41bdfa56440ecc1726fd Mon Sep 17 00:00:00 2001
From: Andrew Straw <[email protected]>
Date: Fri, 25 Sep 2009 18:49:51 -0700
Subject: [PATCH] fix bug with default python for setuptools entry_points console_scripts is not correct
---
Debian/Debhelper/Buildsystem/python_distutils.pm | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm
index bc6e71f..efad08c 100644
--- a/Debian/Debhelper/Buildsystem/python_distutils.pm
+++ b/Debian/Debhelper/Buildsystem/python_distutils.pm
@@ -121,8 +121,8 @@ sub setup_py {
$python_default =~ s/\s+$//;
my @python_requested = split ' ', `pyversions -r 2>/dev/null`;
if (grep /^\Q$python_default\E/, @python_requested) {
- @python_requested = ("python", grep(!/^\Q$python_default\E/,
- @python_requested));
+ @python_requested = (grep(!/^\Q$python_default\E/,
+ @python_requested), "python");
}
my @python_dbg;
@@ -137,7 +137,7 @@ sub setup_py {
}
}
- foreach my $python (@python_requested, @python_dbg) {
+ foreach my $python (@python_dbg, @python_requested) {
if (-x "/usr/bin/".$python) {
# To allow backports of debhelper we don't pass
# --install-layout=deb to 'setup.py install` for
--
1.6.2.1
debhelper_bug_show.sh
Description: Bourne shell script
--- End Message ---
--- Begin Message ---
ssia
--
see shy jo
signature.asc
Description: Digital signature
--- End Message ---