summaryrefslogtreecommitdiff
path: root/morphlib/buildsystem.py
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-04-17 15:40:25 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-04-17 15:51:40 +0000
commit0b6282433257d1f67d4a78c6925ab578719d13f4 (patch)
tree74f23b4dae088de373b1aadc54247b69c62edbe5 /morphlib/buildsystem.py
parent46a477336400a8bfd1ff6fc358b74e0d2b4759d0 (diff)
downloadmorph-0b6282433257d1f67d4a78c6925ab578719d13f4.tar.gz
Add an auto-detected 'python-distutils' build system.
This might still require --prefix to be passed to the install command to work with custom prefixes.
Diffstat (limited to 'morphlib/buildsystem.py')
-rw-r--r--morphlib/buildsystem.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/morphlib/buildsystem.py b/morphlib/buildsystem.py
index 6bff51b2..66d6ff62 100644
--- a/morphlib/buildsystem.py
+++ b/morphlib/buildsystem.py
@@ -123,12 +123,39 @@ class AutotoolsBuildSystem(BuildSystem):
return any(exists(x) for x in indicators)
+class PythonDistutilsBuildSystem(BuildSystem):
+
+ '''The Python distutils build systems.'''
+
+ name = 'python-distutils'
+
+ def __init__(self):
+ self.configure_commands = [
+ ]
+ self.build_commands = [
+ 'python setup.py build',
+ ]
+ self.test_commands = [
+ ]
+ self.install_commands = [
+ 'python setup.py install --root "$DESTDIR"',
+ ]
+
+ def used_by_project(self, exists):
+ indicators = [
+ 'setup.py',
+ ]
+
+ return any(exists(x) for x in indicators)
+
+
build_systems = [
ManualBuildSystem(),
AutotoolsBuildSystem(),
+ PythonDistutilsBuildSystem(),
DummyBuildSystem(),
]
-
+
def detect_build_system(exists):
'''Automatically detect the build system, if possible.