aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Modules/getpath.py
diff options
context:
space:
mode:
authorneonene <53406459+neonene@users.noreply.github.com>2022-06-17 06:41:57 +0900
committerGitHub <noreply@github.com>2022-06-16 22:41:57 +0100
commit38af903506e9b18c6350c1dadcb489f057713f36 (patch)
treefcc091611248f910d20f853e68f9f392e7b68696 /Modules/getpath.py
parentf8e576be0a7cd38f753f31cf4178db81a602fc32 (diff)
downloadcpython-38af903506e9b18c6350c1dadcb489f057713f36.tar.gz
cpython-38af903506e9b18c6350c1dadcb489f057713f36.zip
gh-91985: Ensure in-tree builds override platstdlib_dir in every path calculation (GH-93641)
Diffstat (limited to 'Modules/getpath.py')
-rw-r--r--Modules/getpath.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/getpath.py b/Modules/getpath.py
index 47f075caf55..dceeed7702c 100644
--- a/Modules/getpath.py
+++ b/Modules/getpath.py
@@ -461,7 +461,8 @@ if not py_setpath and not home_was_set:
build_prefix = None
-if not home_was_set and real_executable_dir and not py_setpath:
+if ((not home_was_set and real_executable_dir and not py_setpath)
+ or config.get('_is_python_build', 0) > 0):
# Detect a build marker and use it to infer prefix, exec_prefix,
# stdlib_dir and the platstdlib_dir directories.
try: