From ebdf9b57c8f8fe04b8ead091d581efdf985abf74 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 2 Apr 2014 12:51:50 -0400 Subject: [PATCH] builds occur in temp directories --- bob/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bob/models.py b/bob/models.py index 6da5f1a..f8d8475 100644 --- a/bob/models.py +++ b/bob/models.py @@ -111,11 +111,14 @@ class Formula(object): self.resolve_deps() - print 'Building formula {}:'.format(self.path) + # Temporary directory where work will be carried out, because of David. + cwd_path = mkdtemp(prefix='bob') + + print 'Building formula {} in {}:'.format(self.path, cwd_path) # Execute the formula script. cmd = [self.full_path, self.build_path] - p = process(cmd, cwd=self.build_path) + p = process(cmd, cwd=cwd_path) pipe(p.stdout, sys.stdout, indent=True) p.wait()