From b8698ed06c5f95bbbe1f74135a38d74dafbc9b48 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 18 Jul 2009 13:30:32 +0200 Subject: relocate comment inside if --- Debian/Debhelper/Buildsystem/python_distutils.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm index cca000d6..a5b27d6d 100644 --- a/Debian/Debhelper/Buildsystem/python_distutils.pm +++ b/Debian/Debhelper/Buildsystem/python_distutils.pm @@ -61,12 +61,12 @@ sub pre_building_step { return unless grep /$step/, qw(build install clean); - # --build-base can only be passed to the build command. However, - # it is always read from the config file (really weird design). - # Therefore create such a cfg config file. - # See http://bugs.python.org/issue818201 - # http://bugs.python.org/issue1011113 if ($this->get_buildpath() ne $this->DEFAULT_BUILD_DIRECTORY()) { + # --build-base can only be passed to the build command. However, + # it is always read from the config file (really weird design). + # Therefore create such a cfg config file. + # See http://bugs.python.org/issue818201 + # http://bugs.python.org/issue1011113 not $this->not_our_cfg() or error("cannot set custom build directory: .pydistutils.cfg is in use"); $this->mkdir_builddir(); -- cgit v1.2.3 From b45b22e81de116cc497782fdb199eca19ecdd654 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Jul 2009 09:34:07 +0200 Subject: minor improvement --- Debian/Debhelper/Buildsystem/python_distutils.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm index 9468e38f..502bf24f 100644 --- a/Debian/Debhelper/Buildsystem/python_distutils.pm +++ b/Debian/Debhelper/Buildsystem/python_distutils.pm @@ -89,9 +89,9 @@ sub setup_py { # 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) { + foreach my $python ("python", grep(!/^$python_default/, + (split ' ', `pyversions -r 2>/dev/null`))) { + if (-x "/usr/bin/".$python) { $this->doit_in_sourcedir($python, "setup.py", $act, @_); } } -- cgit v1.2.3 From feb5e4c3cccb539003e043bec406cb32acf3770d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Jul 2009 09:37:21 +0200 Subject: improve comment --- Debian/Debhelper/Buildsystem/python_distutils.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm index 502bf24f..2ee2cc12 100644 --- a/Debian/Debhelper/Buildsystem/python_distutils.pm +++ b/Debian/Debhelper/Buildsystem/python_distutils.pm @@ -82,13 +82,15 @@ 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 + # Then, run setup.py with each available python, to build + # extensions for each. + my $python_default = `pyversions -d`; + $python_default =~ s/^\s+//; + $python_default =~ s/\s+$//; foreach my $python ("python", grep(!/^$python_default/, (split ' ', `pyversions -r 2>/dev/null`))) { if (-x "/usr/bin/".$python) { -- cgit v1.2.3