def _cmd(context, command): cmd_str = ' '.join(quote(x) for x in command) _log("running: %s" % cmd_str) if context is None: p = Popen(command) else: p = context.execute_shell(command=command, block=False) with p: p.wait() if p.returncode: raise BuildError("Failed to download source with pip: %s" % cmd_str)
def run_benchmark(): from rez import module_root_path from rez.utils.execution import Popen if os.path.exists(out_dir): print("Dir specified by --out (%s) must not exist" % out_dir, file=sys.stderr) sys.exit(1) os.mkdir(out_dir) print("Writing results to %s..." % out_dir) # extract package repo filepath = os.path.join(module_root_path, "data", "benchmarking", "packages.tar.gz") proc = Popen(["tar", "-xf", filepath], cwd=out_dir) proc.wait() load_packages() do_resolves()