Skip to content

Commit

Permalink
pythongh-103186: In test_tools.freeze, fetch CONFIG_ARGS from origina…
Browse files Browse the repository at this point in the history
…l source directory (python#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.
  • Loading branch information
TabLand authored Jul 11, 2023
1 parent da86db5 commit de82732
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
``freeze`` now fetches ``CONFIG_ARGS`` from the original CPython instance
the Makefile uses to call utility scripts. Patch by Ijtaba Hussain.
2 changes: 1 addition & 1 deletion Tools/freeze/test/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,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

0 comments on commit de82732

Please sign in to comment.