Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d37cb2

Browse files
committed
Fixes sys.path for applocal environments.
1 parent 1a80081 commit 2d37cb2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Lib/site.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,12 @@ def venv(known_paths):
476476
system_site = value.lower()
477477
elif key == 'home':
478478
sys._home = value
479+
elif key == 'applocal' and value.lower() == 'true':
480+
# App-local installs use the exe_dir as prefix,
481+
# not one level higher, and do not use system
482+
# site packages.
483+
site_prefix = exe_dir
484+
system_site = 'false'
479485

480486
sys.prefix = sys.exec_prefix = site_prefix
481487

0 commit comments

Comments
 (0)