diff options
Diffstat (limited to 'Lib/site.py')
-rw-r--r-- | Lib/site.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/site.py b/Lib/site.py index 6d0fe698795..107f75e7ce2 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -527,8 +527,12 @@ def main(): known_paths = venv(known_paths) if ENABLE_USER_SITE is None: ENABLE_USER_SITE = check_enableusersite() - known_paths = addusersitepackages(known_paths) - known_paths = addsitepackages(known_paths) + if os.environ.get("_PYTHONNOSITEPACKAGES") is None: + known_paths = addusersitepackages(known_paths) + known_paths = addsitepackages(known_paths) + else: + # Initialize USER_BASE and USER_SITE. + getusersitepackages() setquit() setcopyright() sethelper() |