Skip to content

Commit de82732

Browse files
authored
gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory (#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.
1 parent da86db5 commit de82732

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
``freeze`` now fetches ``CONFIG_ARGS`` from the original CPython instance
2+
the Makefile uses to call utility scripts. Patch by Ijtaba Hussain.

Tools/freeze/test/freeze.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def prepare(script=None, outdir=None):
153153
print(f'configuring python in {builddir}...')
154154
cmd = [
155155
os.path.join(srcdir, 'configure'),
156-
*shlex.split(get_config_var(srcdir, 'CONFIG_ARGS') or ''),
156+
*shlex.split(get_config_var(SRCDIR, 'CONFIG_ARGS') or ''),
157157
]
158158
ensure_opt(cmd, 'cache-file', os.path.join(outdir, 'python-config.cache'))
159159
prefix = os.path.join(outdir, 'python-installation')

0 commit comments

Comments
 (0)