def __exit__(self, exc_type, exc_value, traceback):
assert isinstance(process, subprocess.Popen)
self.outputs.extend(map(lambda p: p.communicate(), self.procs))
list(map(lambda p: p.communicate(), self.procs))
# self.outputs.extend(map(lambda p: p.communicate(), self.procs))
ret = list(map(lambda p: p.returncode, self.procs))
if any([r != 0 for r in ret]):
raise RuntimeError('Failed to execute process')
self.returncodes.extend(ret)
# self.returncodes.extend(ret)
def __update(self, process):
assert isinstance(process, subprocess.Popen)
self.procs.append(process)
while len(self.procs) >= self._maxlen:
self.outputs.append(p.communicate())
# self.outputs.append(p.communicate())
raise RuntimeError('Failed to execute process')
self.returncodes.append(r)
# self.returncodes.append(r)
class BuildMyTasksCommand(distutils.cmd.Command):
description = 'Generate the CASA CLI bindings'
user_options = [('inplace', 'i', 'Generate CLI bindings in src directory')]
boolean_options = ['inplace']
def __init__(self, dist):
distutils.cmd.Command.__init__(self, dist)