]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source direct...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 12 Jul 2023 07:32:51 +0000 (00:32 -0700)
committerGitHub <noreply@github.com>
Wed, 12 Jul 2023 07:32:51 +0000 (07:32 +0000)
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>
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')