output = csscompressor.compress(buffer)
with open(output_path, 'w', encoding=ENCODING) as f:
class SubprocessScheduler:
def __init__(self, concurrency=1):
self._maxlen = concurrency
def __exit__(self, exc_type, exc_value, traceback):
assert isinstance(process, subprocess.Popen)
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)
def __update(self, process):
self.procs.append(process)
while len(self.procs) >= self._maxlen:
# self.outputs.append(p.communicate())
raise RuntimeError('Failed to execute process')
# self.returncodes.append(r)
class BuildMyTasksCommand(distutils.cmd.Command):
description = 'Generate the CASA CLI bindings'
('inplace', 'i', 'Generate CLI bindings in src directory'),
('parallel=', 'j', 'number of parallel build jobs')
boolean_options = ['inplace']