(cmd)
| 2533 | from .os_helper import temp_cwd |
| 2534 | |
| 2535 | def run_command(cmd): |
| 2536 | if verbose: |
| 2537 | import shlex |
| 2538 | print() |
| 2539 | print('Run:', ' '.join(map(shlex.quote, cmd))) |
| 2540 | subprocess.run(cmd, check=True) |
| 2541 | else: |
| 2542 | subprocess.run(cmd, |
| 2543 | stdout=subprocess.PIPE, |
| 2544 | stderr=subprocess.STDOUT, |
| 2545 | check=True) |
| 2546 | |
| 2547 | with temp_cwd() as temp_dir: |
| 2548 | # Create virtual environment to get setuptools |