]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Buildsystem/python_distutils.pm
merge master
[debhelper.git] / Debian / Debhelper / Buildsystem / python_distutils.pm
index 0b8367ec56420b4ade7f5566d421603ecfec2fbf..01a8c14ea28d2c21df796c3a2b99416ac2e5a020 100644 (file)
@@ -9,49 +9,40 @@ package Debian::Debhelper::Buildsystem::python_distutils;
 
 use strict;
 use Debian::Debhelper::Dh_Lib;
-use base 'Debian::Debhelper::Dh_Buildsystem_Basic';
+use base 'Debian::Debhelper::Buildsystem';
 
 sub DESCRIPTION {
-       "support for building Python distutils based packages"
+       "Python distutils"
 }
 
-sub is_auto_buildable {
-       my $self=shift;
-       my $action=shift;
-
-       # Handle build install clean; the rest - next class
-       # XXX JEH shouldn't it also handle configure? It would be handled
-       # by doing nothing, but that's what's appropriate for python.
-       if (grep(/^\Q$action\E$/, qw{build install clean})) {
-               return -e "setup.py";
-       }
-       return 0;
+sub check_auto_buildable {
+       return -e "setup.py";
 }
 
 sub setup_py {
-       my $self=shift;
+       my $this=shift;
        my $act=shift;
 
-       if ($self->get_builddir()) {
-               unshift @_, "--build-base=" . $self->get_builddir();
+       if ($this->get_builddir()) {
+               unshift @_, "--build-base=" . $this->get_builddir();
        }
        doit("python", "setup.py", $act, @_);
 }
 
 sub build {
-       my $self=shift;
-       $self->setup_py("build", @_);
+       my $this=shift;
+       $this->setup_py("build", @_);
 }
 
 sub install {
-       my $self=shift;
+       my $this=shift;
        my $destdir=shift;
-       $self->setup_py("install", "--root=$destdir", "--no-compile", "-O0", @_);
+       $this->setup_py("install", "--root=$destdir", "--no-compile", "-O0", @_);
 }
 
 sub clean {
-       my $self=shift;
-       $self->setup_py("clean", "-a", @_);
+       my $this=shift;
+       $this->setup_py("clean", "-a", @_);
        # The setup.py might import files, leading to python creating pyc
        # files.
        doit('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');