diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-07-19 09:32:31 +0200 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-07-19 09:32:31 +0200 |
commit | c37c455dc7130a1c8b77e4a7a4c0241be0dcafb4 (patch) | |
tree | 09ae7f50a92562348bcd8b96131c8f0982342538 /Debian/Debhelper | |
parent | b8698ed06c5f95bbbe1f74135a38d74dafbc9b48 (diff) | |
parent | ab10d851eb3cab5c08980bfecec35453c45745a6 (diff) |
Merge commit 'remotes/bzed/python-build' into buildsystems
Diffstat (limited to 'Debian/Debhelper')
-rw-r--r-- | Debian/Debhelper/Buildsystem/python_distutils.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm index a5b27d6d..9468e38f 100644 --- a/Debian/Debhelper/Buildsystem/python_distutils.pm +++ b/Debian/Debhelper/Buildsystem/python_distutils.pm @@ -82,7 +82,19 @@ sub pre_building_step { sub setup_py { my $this=shift; my $act=shift; + my $python_default = `pyversions -d`; + $python_default =~ s/^\s+//; + $python_default =~ s/\s+$//; + + # We need to to run setup.py with the default python first + # as distutils/setuptools modifies the shebang lines of scripts. + # This ensures that #!/usr/bin/python is used and not pythonX.Y $this->doit_in_sourcedir("python", "setup.py", $act, @_); + for my $python (grep(!/^$python_default/, (split ' ', `pyversions -r 2>/dev/null`))) { + if (-x "/usr/bin/" . $python) { + $this->doit_in_sourcedir($python, "setup.py", $act, @_); + } + } } sub build { |