mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-99370: Calculate zip path from prefix when in a venv (GH-99371)
Before python3.11, when in a venv the zip path is calculated from prefix on POSIX platforms. In python3.11 the behavior is accidentally changed to calculating from default prefix. This change will break venv created from a non-installed python with a stdlib zip file. This commit restores the behavior back to before python3.11.
This commit is contained in:
parent
a3ac9232f8
commit
e3d4fed074
4 changed files with 99 additions and 2 deletions
|
@ -679,9 +679,8 @@ elif not pythonpath_was_set:
|
|||
else:
|
||||
library_dir = executable_dir
|
||||
pythonpath.append(joinpath(library_dir, ZIP_LANDMARK))
|
||||
elif build_prefix or venv_prefix:
|
||||
elif build_prefix:
|
||||
# QUIRK: POSIX uses the default prefix when in the build directory
|
||||
# or a venv
|
||||
pythonpath.append(joinpath(PREFIX, ZIP_LANDMARK))
|
||||
else:
|
||||
pythonpath.append(joinpath(prefix, ZIP_LANDMARK))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue