From c7ad7b41011f4cfab14a21d0363a511b86969e86 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 19 Feb 2013 15:29:48 +0000 Subject: Add pre- and post-commands for chunks We already have configure-commands. Add pre-configure-commands and post-configure-commands. Likewise for build-command, test-commands, and install-commands. Added-to-pacify: Rob Kendrick --- morphlib/buildsystem.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'morphlib/buildsystem.py') diff --git a/morphlib/buildsystem.py b/morphlib/buildsystem.py index 6287063a..4d3f94c4 100644 --- a/morphlib/buildsystem.py +++ b/morphlib/buildsystem.py @@ -32,10 +32,18 @@ class BuildSystem(object): ''' def __init__(self): + self.pre_configure_commands = [] self.configure_commands = [] + self.post_configure_commands = [] + self.pre_build_commands = [] self.build_commands = [] + self.post_build_commands = [] + self.pre_test_commands = [] self.test_commands = [] + self.post_test_commands = [] + self.pre_install_commands = [] self.install_commands = [] + self.post_install_commands = [] def __getitem__(self, key): key = '_'.join(key.split('-')) @@ -82,6 +90,7 @@ class DummyBuildSystem(BuildSystem): name = 'dummy' def __init__(self): + BuildSystem.__init__(self) self.configure_commands = ['echo dummy configure'] self.build_commands = ['echo dummy build'] self.test_commands = ['echo dummy test'] @@ -98,6 +107,7 @@ class AutotoolsBuildSystem(BuildSystem): name = 'autotools' def __init__(self): + BuildSystem.__init__(self) self.configure_commands = [ 'export NOCONFIGURE=1; ' + 'if [ -e autogen ]; then ./autogen; ' + @@ -134,6 +144,7 @@ class PythonDistutilsBuildSystem(BuildSystem): name = 'python-distutils' def __init__(self): + BuildSystem.__init__(self) self.configure_commands = [ ] self.build_commands = [ @@ -160,6 +171,7 @@ class CPANBuildSystem(BuildSystem): name = 'cpan' def __init__(self): + BuildSystem.__init__(self) self.configure_commands = [ 'perl Makefile.PL INSTALLDIRS=perl ' 'INSTALLARCHLIB="$PREFIX/lib/perl" ' -- cgit v1.2.1