at 25.11-pre 1.8 kB view raw
1--- a/conda/base/context.py 2+++ b/conda/base/context.py 3@@ -754,7 +754,7 @@ 4 5 @property 6 def conda_prefix(self): 7- return abspath(sys.prefix) 8+ return expand("~/.conda") 9 10 @property 11 @deprecated( 12@@ -787,27 +787,17 @@ 13 The vars can refer to each other if necessary since the dict is ordered. 14 None means unset it. 15 """ 16- if context.dev: 17- return { 18- "CONDA_EXE": sys.executable, 19- # do not confuse with os.path.join, we are joining paths with ; or : delimiters 20- "PYTHONPATH": os.pathsep.join( 21- (CONDA_SOURCE_ROOT, os.environ.get("PYTHONPATH", "")) 22- ), 23- "_CE_M": "-m", 24- "_CE_CONDA": "conda", 25- "CONDA_PYTHON_EXE": sys.executable, 26- } 27- else: 28- exe = "conda.exe" if on_win else "conda" 29- # I was going to use None to indicate a variable to unset, but that gets tricky with 30- # error-on-undefined. 31- return { 32- "CONDA_EXE": os.path.join(sys.prefix, BIN_DIRECTORY, exe), 33- "_CE_M": "", 34- "_CE_CONDA": "", 35- "CONDA_PYTHON_EXE": sys.executable, 36- } 37+ import sys 38+ return { 39+ "CONDA_EXE": sys.executable, 40+ # do not confuse with os.path.join, we are joining paths with ; or : delimiters 41+ "PYTHONPATH": os.pathsep.join( 42+ [CONDA_SOURCE_ROOT, os.environ.get("PYTHONPATH", "")] + [path for path in sys.path if "site-packages" in path] 43+ ), 44+ "_CE_M": "-m", 45+ "_CE_CONDA": "conda", 46+ "CONDA_PYTHON_EXE": sys.executable, 47+ } 48 49 @memoizedproperty 50 def channel_alias(self):