summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-02-10 10:28:44 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-02-10 10:28:44 +0000
commitb2b8d7b903fb146409be9d62391c64b83b3d7c88 (patch)
treefff322f5309120c25d9cddf5a5c6a27befc305e7 /morph
parent30ea6a70c89996345fd2329b1365eca4f96b5a9c (diff)
downloadmorph-b2b8d7b903fb146409be9d62391c64b83b3d7c88.tar.gz
Add --tempdir option, allow to set the tempdir for building.
This will not affect or overwrite TMPDIR, so all other parts of morph and Python (like the multiprocessing library) will still use TMPDIR (e.g. /tmp) for temporary files and directories.
Diffstat (limited to 'morph')
-rwxr-xr-xmorph9
1 files changed, 6 insertions, 3 deletions
diff --git a/morph b/morph
index 66e90a3b..7e2372c2 100755
--- a/morph
+++ b/morph
@@ -43,6 +43,9 @@ class Morph(cliapp.Application):
self.settings.string(['cachedir'],
'put build results in DIR (default: %default)',
metavar='DIR', default='.')
+ self.settings.string(['tempdir'],
+ 'temporary to use for builds',
+ metavar='DIR', default='/tmp')
self.settings.boolean(['no-ccache'], 'do not use ccache')
self.settings.boolean(['no-distcc'], 'do not use distcc')
self.settings.integer(['max-jobs'],
@@ -91,7 +94,7 @@ class Morph(cliapp.Application):
'''
- tempdir = morphlib.tempdir.Tempdir()
+ tempdir = morphlib.tempdir.Tempdir(self.settings['tempdir'])
morph_loader = MorphologyLoader(self.settings)
source_manager = morphlib.sourcemanager.SourceManager(self)
builder = morphlib.builder.Builder(tempdir, self, morph_loader,
@@ -239,7 +242,7 @@ class Morph(cliapp.Application):
staging area.
'''
- tempdir = morphlib.tempdir.Tempdir()
+ tempdir = morphlib.tempdir.Tempdir(self.settings['tempdir'])
morph_loader = MorphologyLoader(self.settings)
source_manager = morphlib.sourcemanager.SourceManager(self,
update=False)
@@ -329,7 +332,7 @@ class Morph(cliapp.Application):
'''
- tempdir = morphlib.tempdir.Tempdir()
+ tempdir = morphlib.tempdir.Tempdir(self.settings['tempdir'])
morph_loader = MorphologyLoader(self.settings)
source_manager = morphlib.sourcemanager.SourceManager(self)