Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Sep 29, 2023
1 parent ff148fe commit da55dc2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Tools/freeze/test/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,17 @@ class UnsupportedError(Exception):
"""The operation isn't supported."""


def _run(cmd, cwd=None):
print('+', shlex.join(cmd))
return subprocess.run(
cmd,
cwd=cwd,
check=True,
)


def _run_quiet(cmd, cwd=None):
#print(f'# {" ".join(shlex.quote(a) for a in cmd)}')
print('+', shlex.join(cmd))
try:
return subprocess.run(
cmd,
Expand Down Expand Up @@ -125,7 +134,7 @@ def prepare(script=None, outdir=None):
ensure_opt(cmd, 'cache-file', os.path.join(outdir, 'python-config.cache'))
prefix = os.path.join(outdir, 'python-installation')
ensure_opt(cmd, 'prefix', prefix)
_run_quiet(cmd, builddir)
_run(cmd, builddir)

if not MAKE:
raise UnsupportedError('make')
Expand Down

0 comments on commit da55dc2

Please sign in to comment.