From: Steve Dower Date: Fri, 17 Jul 2015 18:59:21 +0000 (-0700) Subject: Fixes sys.path for applocal environments. X-Git-Tag: v3.5.0b4~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d37cb2e1df89fd6df1615953c922c1729799a04;p=python Fixes sys.path for applocal environments. --- diff --git a/Lib/site.py b/Lib/site.py index b7d0331fa7..6f66c07de5 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -476,6 +476,12 @@ def venv(known_paths): system_site = value.lower() elif key == 'home': sys._home = value + elif key == 'applocal' and value.lower() == 'true': + # App-local installs use the exe_dir as prefix, + # not one level higher, and do not use system + # site packages. + site_prefix = exe_dir + system_site = 'false' sys.prefix = sys.exec_prefix = site_prefix