comparison mxtool/mx.py @ 16682:63706366f6c5

moved distribution artifacts into build/ sub-directory
author Doug Simon <doug.simon@oracle.com>
date Mon, 04 Aug 2014 16:50:50 +0200
parents 7cdd7ede912d
children ff2b25002a58
comparison
equal deleted inserted replaced
16681:74123ce7599b 16682:63706366f6c5
2684 def __init__(self, path): 2684 def __init__(self, path):
2685 self.path = path 2685 self.path = path
2686 2686
2687 def __enter__(self): 2687 def __enter__(self):
2688 if self.path: 2688 if self.path:
2689 if not isdir(dirname(self.path)):
2690 os.makedirs(dirname(self.path))
2689 fd, tmp = tempfile.mkstemp(suffix='', prefix=basename(self.path) + '.', dir=dirname(self.path)) 2691 fd, tmp = tempfile.mkstemp(suffix='', prefix=basename(self.path) + '.', dir=dirname(self.path))
2690 self.tmpFd = fd 2692 self.tmpFd = fd
2691 self.tmpPath = tmp 2693 self.tmpPath = tmp
2692 self.zf = zipfile.ZipFile(tmp, 'w') 2694 self.zf = zipfile.ZipFile(tmp, 'w')
2693 else: 2695 else: