Skip to content

Commit

Permalink
MORE DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Sep 29, 2023
1 parent 576c591 commit 742381c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,7 @@ clinic-tests: check-clean-src $(srcdir)/Lib/test/clinic.test.c
# Build the interpreter
$(BUILDPYTHON): Programs/python.o $(LINK_PYTHON_DEPS)
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
echo "$(BUILDPYTHON) built successfully"

platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
Expand Down
15 changes: 12 additions & 3 deletions Tools/freeze/test/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class UnsupportedError(Exception):


def _run(cmd, cwd=None):
print('+', shlex.join(cmd))
print('+', shlex.join(cmd), flush=True)
return subprocess.run(
cmd,
cwd=cwd,
Expand All @@ -37,7 +37,7 @@ def _run(cmd, cwd=None):


def _run_quiet(cmd, cwd=None):
print('+', shlex.join(cmd))
print('+', shlex.join(cmd), flush=True)
try:
return subprocess.run(
cmd,
Expand All @@ -53,7 +53,7 @@ def _run_quiet(cmd, cwd=None):
print(err.stdout)
print("--- STDERR ---")
print(err.stderr)
print("---- END ----")
print("---- END ----", flush=True)
raise


Expand Down Expand Up @@ -136,6 +136,15 @@ def prepare(script=None, outdir=None):
ensure_opt(cmd, 'prefix', prefix)
_run(cmd, builddir)

# Dump Makefile
build_Makefile = os.path.join(builddir, 'Makefile')
with open(build_Makefile, encoding="utf8", errors="backslashreplace") as fp:
content = fp.read()
print("Makefile")
print("--")
print(content)
print("--")

if not MAKE:
raise UnsupportedError('make')

Expand Down

0 comments on commit 742381c

Please sign in to comment.