]> granicus.if.org Git - python/commitdiff
Fixes sys.path for applocal environments.
authorSteve Dower <steve.dower@microsoft.com>
Fri, 17 Jul 2015 18:59:21 +0000 (11:59 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Fri, 17 Jul 2015 18:59:21 +0000 (11:59 -0700)
Lib/site.py

index b7d0331fa75afd049182e39637c2f4e1d1b32ab3..6f66c07de5feec715e11310254a2df39ae2ab19e 100644 (file)
@@ -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