summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem/python_distutils.pm
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2009-06-09 14:24:04 +0300
committerModestas Vainius <modestas@vainius.eu>2009-06-09 14:24:04 +0300
commitf72b0db0446788a867c5115845b28371ab5f0e9b (patch)
tree2029151f33a00592f9ad27faa61e91799567fb56 /Debian/Debhelper/Buildsystem/python_distutils.pm
parent299cb17e2a2a2524c628c0581ba2a85b2d9b2bed (diff)
Implement source directory switching support (Closes: #530597).
* New optional option --sourcedirectory/-d. * New Buildsystem API methods for getting source directory/path (since sourcedir may no longer be topdir), source 2 build directory convertions, doit_in_sourcedir() etc. * clean_builddir() -> rmdir_builddir() rename.
Diffstat (limited to 'Debian/Debhelper/Buildsystem/python_distutils.pm')
-rw-r--r--Debian/Debhelper/Buildsystem/python_distutils.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm
index 01a8c14e..bfb76eea 100644
--- a/Debian/Debhelper/Buildsystem/python_distutils.pm
+++ b/Debian/Debhelper/Buildsystem/python_distutils.pm
@@ -8,7 +8,6 @@
package Debian::Debhelper::Buildsystem::python_distutils;
use strict;
-use Debian::Debhelper::Dh_Lib;
use base 'Debian::Debhelper::Buildsystem';
sub DESCRIPTION {
@@ -16,7 +15,8 @@ sub DESCRIPTION {
}
sub check_auto_buildable {
- return -e "setup.py";
+ my $this=shift;
+ return -e $this->get_sourcepath("setup.py");
}
sub setup_py {
@@ -24,9 +24,9 @@ sub setup_py {
my $act=shift;
if ($this->get_builddir()) {
- unshift @_, "--build-base=" . $this->get_builddir();
+ unshift @_, "--build-base=" . $this->get_build_rel2sourcedir();
}
- doit("python", "setup.py", $act, @_);
+ $this->doit_in_sourcedir("python", "setup.py", $act, @_);
}
sub build {
@@ -45,7 +45,7 @@ sub clean {
$this->setup_py("clean", "-a", @_);
# The setup.py might import files, leading to python creating pyc
# files.
- doit('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');
+ $this->doit_in_sourcedir('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');
}
1;