1 # A buildsystem plugin for building Python Distutils based
4 # Copyright: © 2008 Joey Hess
5 # © 2008-2009 Modestas Vainius
8 package Debian::Debhelper::Buildsystem::python_distutils;
11 use Debian::Debhelper::Dh_Lib;
12 use Debian::Debhelper::Dh_Buildsystem_Bases;
13 use base 'Debian::Debhelper::Dh_Buildsystem_Option';
16 "support for building Python distutils based packages"
23 sub get_builddir_option {
25 if ($self->get_builddir()) {
26 return "--build-base=". $self->get_builddir();
31 # XXX JEH the default for all these methods is to do nothing successfully.
32 # So either this, or those default stubs, need to be removed.
40 doit("python", "setup.py", "build", @_);
43 # XXX JEH see anove comment
52 doit("python", "setup.py", "install",
54 "--no-compile", "-O0", @_);
59 doit("python", "setup.py", "clean", "-a", @_);
60 # The setup.py might import files, leading to python creating pyc
62 doit('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');