summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorFilipe Laíns 🇵🇸 <lains@riseup.net>2025-01-08 20:23:16 (GMT)
committerGitHub <noreply@github.com>2025-01-08 20:23:16 (GMT)
commit34e840f9ddd9c04991cf004e2594c6a1e0e278d3 (patch)
tree06061a1c61d66883b701b0cd66985479740b2703 /Modules
parent004f9fd1f22643100aa8163cc9f7bcde7df54973 (diff)
downloadcpython-34e840f9ddd9c04991cf004e2594c6a1e0e278d3.zip
cpython-34e840f9ddd9c04991cf004e2594c6a1e0e278d3.tar.gz
cpython-34e840f9ddd9c04991cf004e2594c6a1e0e278d3.tar.bz2
GH-66409: check if exec_prefix is the same as prefix before searching executable_dir (#127974)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/getpath.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/getpath.py b/Modules/getpath.py
index c34101e..be22103 100644
--- a/Modules/getpath.py
+++ b/Modules/getpath.py
@@ -625,6 +625,8 @@ else:
# gh-100320: Our PYDs are assumed to be relative to the Lib directory
# (that is, prefix) rather than the executable (that is, executable_dir)
exec_prefix = prefix
+ if not exec_prefix and prefix and isdir(joinpath(prefix, PLATSTDLIB_LANDMARK)):
+ exec_prefix = prefix
if not exec_prefix and executable_dir:
exec_prefix = search_up(executable_dir, PLATSTDLIB_LANDMARK, test=isdir)
if not exec_prefix and EXEC_PREFIX: