eric7/PipInterface/Pip.py

branch
eric7-maintenance
changeset 9111
4ac66b6c33a4
parent 9016
6f079c524e99
child 9192
a763d57e23bc
equal deleted inserted replaced
9049:2b9bd8f97576 9111:4ac66b6c33a4
201 @param venvName logical name for the virtual environment 201 @param venvName logical name for the virtual environment
202 @type str 202 @type str
203 @return interpreter path 203 @return interpreter path
204 @rtype str 204 @rtype str
205 """ 205 """
206 if venvName == self.getProjectEnvironmentString():
207 venvName = (
208 ericApp().getObject("Project")
209 .getDebugProperty("VIRTUALENV")
210 )
211 if not venvName:
212 # fall back to interpreter used to run eric7
213 return Globals.getPythonExecutable()
214
215 interpreter = ( 206 interpreter = (
207 ericApp().getObject("Project").getProjectInterpreter()
208 if venvName == self.getProjectEnvironmentString() else
216 ericApp().getObject("VirtualEnvManager") 209 ericApp().getObject("VirtualEnvManager")
217 .getVirtualenvInterpreter(venvName) 210 .getVirtualenvInterpreter(venvName)
218 ) 211 )
219 if not interpreter: 212 if not interpreter:
220 EricMessageBox.critical( 213 EricMessageBox.critical(
1009 "-c", 1002 "-c",
1010 content, 1003 content,
1011 "--from", 1004 "--from",
1012 "mixed", 1005 "mixed",
1013 "--with-system", 1006 "--with-system",
1007 "--with-authors",
1008 "--with-urls",
1009 "--with-description",
1014 ] 1010 ]
1015 if localPackages: 1011 if localPackages:
1016 args.append("--local-only") 1012 args.append("--local-only")
1017 if usersite: 1013 if usersite:
1018 args.append("--user-only") 1014 args.append("--user-only")

eric ide

mercurial