summaryrefslogtreecommitdiff
path: root/morphlib/buildsystem.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-30 16:16:02 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-30 16:16:02 +0100
commit609a64acedf6ec4697bf129b29f3c1187ae5d7e9 (patch)
treed91ef482d87a40ab15a298655d6ebfd90d716799 /morphlib/buildsystem.py
parentebb7afe4def25b96708fda330b154de092342250 (diff)
downloadmorph-609a64acedf6ec4697bf129b29f3c1187ae5d7e9.tar.gz
Add indexing access to the various commands in build systems
Diffstat (limited to 'morphlib/buildsystem.py')
-rw-r--r--morphlib/buildsystem.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/buildsystem.py b/morphlib/buildsystem.py
index 759693d2..ba6d8998 100644
--- a/morphlib/buildsystem.py
+++ b/morphlib/buildsystem.py
@@ -36,6 +36,10 @@ class BuildSystem(object):
self.build_commands = []
self.test_commands = []
self.install_commands = []
+
+ def __getitem__(self, key):
+ key = '_'.join(key.split('-'))
+ return getattr(self, key)
def used_by_project(self, srcdir):
'''Does project at ``srcdir`` use this build system?'''