]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory...
authorIjtaba Hussain <ijtabahussain@live.com>
Tue, 11 Jul 2023 22:22:18 +0000 (23:22 +0100)
committerGitHub <noreply@github.com>
Tue, 11 Jul 2023 22:22:18 +0000 (22:22 +0000)
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.

Misc/NEWS.d/next/Tools-Demos/2023-04-05-07-19-36.gh-issue-103186.yEozgK.rst [new file with mode: 0644]
Tools/freeze/test/freeze.py

diff --git a/Misc/NEWS.d/next/Tools-Demos/2023-04-05-07-19-36.gh-issue-103186.yEozgK.rst b/Misc/NEWS.d/next/Tools-Demos/2023-04-05-07-19-36.gh-issue-103186.yEozgK.rst
new file mode 100644 (file)
index 0000000..7e28ba6
--- /dev/null
@@ -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.
index f6a5adb4519fdb041675d433c323daf397f00fae..92e97cb261719c8e9abf4cf5512490061c26537d 100644 (file)
@@ -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')