gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory (GH-103213)
Fetch CONFIG_ARGS from the original source directory, instead of from
the copied source tree. When "make clean" is executed in the copied
source tree, the build directory is cleared and the configure argument
lookup fails. However, the original source directory still contains this
information.
(cherry picked from commit
de827322ca47e51d52ff44536a7c3fd44648383a)
Co-authored-by: Ijtaba Hussain <ijtabahussain@live.com>
--- /dev/null
+``freeze`` now fetches ``CONFIG_ARGS`` from the original CPython instance
+the Makefile uses to call utility scripts. Patch by Ijtaba Hussain.
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')