https://github.com/python/cpython/commit/a549f439384b4509b25639337ffea21c2e55d452
commit: a549f439384b4509b25639337ffea21c2e55d452
branch: main
author: Victor Stinner <[email protected]>
committer: FFY00 <[email protected]>
date: 2025-01-30T00:02:31Z
summary:
gh-128779: Fix site venv() for system site-packages (#129184)
files:
M Lib/site.py
diff --git a/Lib/site.py b/Lib/site.py
index 92bd1ccdadd924..9da8b6724e1cec 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -633,12 +633,9 @@ def venv(known_paths):
# Doing this here ensures venv takes precedence over user-site
addsitepackages(known_paths, [sys.prefix])
- # addsitepackages will process site_prefix again if its in PREFIXES,
- # but that's ok; known_paths will prevent anything being added twice
if system_site == "true":
- PREFIXES.insert(0, sys.prefix)
+ PREFIXES += [sys.base_prefix, sys.base_exec_prefix]
else:
- PREFIXES = [sys.prefix]
ENABLE_USER_SITE = False
return known_paths
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]