summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem
diff options
context:
space:
mode:
authorBernd Zeimetz <bernd@bzed.de>2009-08-08 03:32:48 +0200
committerBernd Zeimetz <bernd@bzed.de>2009-08-08 04:14:35 +0200
commit061bf3b1adffd2f668f3ae0a1eeb985cc8d00201 (patch)
tree455d5642f6c1fcadcb164956d411bae03bdb5f11 /Debian/Debhelper/Buildsystem
parent18a5bea209de05d47df17a731634eab21f991d4e (diff)
python_distutils.pm: Support debhelper backports.
To allow backports of debhelper we don't pass --install-layout=deb to 'setup.py install` for those Python versions where the option is ignored by distutils/setuptools.
Diffstat (limited to 'Debian/Debhelper/Buildsystem')
-rw-r--r--Debian/Debhelper/Buildsystem/python_distutils.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm
index 4838cada..9cf12e11 100644
--- a/Debian/Debhelper/Buildsystem/python_distutils.pm
+++ b/Debian/Debhelper/Buildsystem/python_distutils.pm
@@ -114,7 +114,10 @@ sub setup_py {
# Take into account that the default Python must not be in
# the requested Python versions.
# Then, run setup.py with each available python, to build
- # extensions for each.
+ # extensions for each.
+ # To allow backports of debhelper we don't pass
+ # --install-layout=deb to 'setup.py install` for those Python
+ # versions where the option is ignored by distutils/setuptools.
my $python_default = `pyversions -d`;
$python_default =~ s/^\s+//;
@@ -139,7 +142,17 @@ sub setup_py {
foreach my $python (@python_requested, @python_dbg) {
if (-x "/usr/bin/".$python) {
- $this->doit_in_sourcedir($python, "setup.py", $act, @_);
+ if ( $act eq "install" and not
+ ( ($python =~ /^python(?:-dbg)?$/
+ and $python_default =~ /^python2.[2345]$/)
+ or $python =~ /^python2.[2345](?:-dbg)?$/ )) {
+ $this->doit_in_sourcedir($python, "setup.py",
+ $act, @_, "--install-layout=deb");
+ }
+ else {
+ $this->doit_in_sourcedir($python, "setup.py",
+ $act, @_);
+ }
}
}
}
@@ -156,7 +169,6 @@ sub install {
"--root=$destdir",
"--no-compile",
"-O0",
- "--install-layout=deb",
@_);
}