Skip to content
Next Next commit
Fetch CONFIG_ARGS from original python instance
instead of fetching from intermediate instance. As "make clean" is called
against the intermediate instance, the build directory is cleared and the
config arguments lookup fails with a ModuleNotFoundError
  • Loading branch information
TabLand committed Apr 3, 2023
commit d3217d12eee9eefad8444e80545b82b2a8c2be4c
4 changes: 3 additions & 1 deletion Tools/freeze/test/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def ignore_non_src(src, names):
shutil.copytree(oldroot, newroot, ignore=ignore_non_src)
if os.path.exists(os.path.join(newroot, 'Makefile')):
_run_quiet([MAKE, 'clean'], newroot)
else:
raise Exception("new frozen build Makefile missing!")


def get_makefile_var(builddir, name):
Expand Down Expand Up @@ -153,7 +155,7 @@ def prepare(script=None, outdir=None):
print(f'configuring python in {builddir}...')
cmd = [
os.path.join(srcdir, 'configure'),
*shlex.split(get_config_var(srcdir, 'CONFIG_ARGS') or ''),
*shlex.split(get_config_var(SRCDIR, 'CONFIG_ARGS') or ''),
]
ensure_opt(cmd, 'cache-file', os.path.join(outdir, 'python-config.cache'))
prefix = os.path.join(outdir, 'python-installation')
Expand Down