Skip to content

Commit af06a8a

Browse files
[3.12] gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory (GH-103213) (#106667)
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 de82732) Co-authored-by: Ijtaba Hussain <[email protected]>
1 parent ae31599 commit af06a8a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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)