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();
38 doit("python", "setup.py", "build", @_);
49 doit("python", "setup.py", "install",
51 "--no-compile", "-O0", @_);
56 doit("python", "setup.py", "clean", "-a", @_);
57 # The setup.py might import files, leading to python creating pyc
59 doit('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');