src/eric7/VirtualEnv/VirtualenvManager.py

branch
eric7
changeset 9556
b90938c52816
parent 9506
62397ab8df8c
child 9559
34fc53e6159d
equal deleted inserted replaced
9552:68ed8b69ce93 9556:b90938c52816
14 import sys 14 import sys
15 15
16 from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot 16 from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot
17 from PyQt6.QtWidgets import QDialog 17 from PyQt6.QtWidgets import QDialog
18 18
19 from eric7 import Globals, Preferences 19 from eric7 import Globals, Preferences, Utilities
20 from eric7.EricWidgets import EricMessageBox 20 from eric7.EricWidgets import EricMessageBox
21 from eric7.EricWidgets.EricApplication import ericApp 21 from eric7.EricWidgets.EricApplication import ericApp
22 from eric7.UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog 22 from eric7.UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog
23 23
24 24
182 @type str 182 @type str
183 @return tuple containing the environment name and a dictionary 183 @return tuple containing the environment name and a dictionary
184 containing a copy of the default virtual environment 184 containing a copy of the default virtual environment
185 @rtype tuple of (str, dict) 185 @rtype tuple of (str, dict)
186 """ 186 """
187 py = interpreter.replace("w.exe", ".exe") 187 py = Utilities.normcaseabspath(interpreter.replace("w.exe", ".exe"))
188 for venvName in self.__virtualEnvironments: 188 for venvName in self.__virtualEnvironments:
189 if os.path.samefile( 189 if py == Utilities.normcaseabspath(
190 py, self.__virtualEnvironments[venvName]["interpreter"] 190 self.__virtualEnvironments[venvName]["interpreter"]
191 ): 191 ):
192 return (venvName, copy.copy(self.__virtualEnvironments[venvName])) 192 return (venvName, copy.copy(self.__virtualEnvironments[venvName]))
193 193
194 if os.path.samefile(interpreter, sys.executable): 194 if os.path.samefile(interpreter, sys.executable):
195 return (VirtualenvManager.SystemKey, {}) 195 return (VirtualenvManager.SystemKey, {})

eric ide

mercurial