91 @pyqtSlot() |
91 @pyqtSlot() |
92 def on_newEnvironmentButton_clicked(self): |
92 def on_newEnvironmentButton_clicked(self): |
93 """ |
93 """ |
94 Private slot to open a dialog for adding a new virtual environment. |
94 Private slot to open a dialog for adding a new virtual environment. |
95 """ |
95 """ |
|
96 from eric7.VirtualEnv.VirtualenvExecDialog import VirtualenvExecDialog |
|
97 |
96 from .FlaskVirtualenvConfigurationDialog import ( |
98 from .FlaskVirtualenvConfigurationDialog import ( |
97 FlaskVirtualenvConfigurationDialog, |
99 FlaskVirtualenvConfigurationDialog, |
98 ) |
100 ) |
99 |
101 |
100 ericProject = ericApp().getObject("Project") |
102 ericProject = ericApp().getObject("Project") |
103 ) |
105 ) |
104 if dlg.exec() == QDialog.DialogCode.Accepted: |
106 if dlg.exec() == QDialog.DialogCode.Accepted: |
105 resultDict = dlg.getData() |
107 resultDict = dlg.getData() |
106 |
108 |
107 # now do the call |
109 # now do the call |
108 from VirtualEnv.VirtualenvExecDialog import VirtualenvExecDialog |
|
109 |
|
110 dia = VirtualenvExecDialog(resultDict, self.__virtualEnvManager, self) |
110 dia = VirtualenvExecDialog(resultDict, self.__virtualEnvManager, self) |
111 dia.show() |
111 dia.show() |
112 dia.start(resultDict["arguments"]) |
112 dia.start(resultDict["arguments"]) |
113 dia.exec() |
113 dia.exec() |
114 |
114 |
131 Private method to install flask into the newly created environment. |
131 Private method to install flask into the newly created environment. |
132 |
132 |
133 @param venvDir directory containing the virtual environment |
133 @param venvDir directory containing the virtual environment |
134 @type str |
134 @type str |
135 """ |
135 """ |
136 from PipInterface.PipDialog import PipDialog |
136 from eric7.PipInterface.PipDialog import PipDialog |
137 |
137 |
138 interpreter = self.__project.getFullCommand("python", venvDir) |
138 interpreter = self.__project.getFullCommand("python", venvDir) |
139 if Preferences.getPip("PipSearchIndex"): |
139 if Preferences.getPip("PipSearchIndex"): |
140 indexUrl = Preferences.getPip("PipSearchIndex") + "/simple" |
140 indexUrl = Preferences.getPip("PipSearchIndex") + "/simple" |
141 args = ["-m", "pip", "install", "--index-url", indexUrl] |
141 args = ["-m", "pip", "install", "--index-url", indexUrl] |