99 FlaskVirtualenvConfigurationDialog, |
99 FlaskVirtualenvConfigurationDialog, |
100 ) |
100 ) |
101 |
101 |
102 ericProject = ericApp().getObject("Project") |
102 ericProject = ericApp().getObject("Project") |
103 dlg = FlaskVirtualenvConfigurationDialog( |
103 dlg = FlaskVirtualenvConfigurationDialog( |
104 ericProject.getProjectPath(), ericProject.getProjectName(), self |
104 ericProject.getProjectPath(), ericProject.getProjectName(), parent=self |
105 ) |
105 ) |
106 if dlg.exec() == QDialog.DialogCode.Accepted: |
106 if dlg.exec() == QDialog.DialogCode.Accepted: |
107 resultDict = dlg.getData() |
107 resultDict = dlg.getData() |
108 |
108 |
109 # now do the call |
109 # now do the call |
110 dia = VirtualenvExecDialog(resultDict, self.__virtualEnvManager, self) |
110 dia = VirtualenvExecDialog( |
|
111 resultDict, self.__virtualEnvManager, parent=self |
|
112 ) |
111 dia.show() |
113 dia.show() |
112 dia.start(resultDict["arguments"]) |
114 dia.start(resultDict["arguments"]) |
113 dia.exec() |
115 dia.exec() |
114 |
116 |
115 self.virtualEnvironmentComboBox.clear() |
117 self.virtualEnvironmentComboBox.clear() |
140 indexUrl = Preferences.getPip("PipSearchIndex") + "/simple" |
142 indexUrl = Preferences.getPip("PipSearchIndex") + "/simple" |
141 args = ["-m", "pip", "install", "--index-url", indexUrl] |
143 args = ["-m", "pip", "install", "--index-url", indexUrl] |
142 else: |
144 else: |
143 args = ["-m", "pip", "install"] |
145 args = ["-m", "pip", "install"] |
144 args.append("flask") |
146 args.append("flask") |
145 dia = PipDialog(self.tr("Install Flask"), self) |
147 dia = PipDialog(self.tr("Install Flask"), parent=self) |
146 res = dia.startProcess(interpreter, args) |
148 res = dia.startProcess(interpreter, args) |
147 if res: |
149 if res: |
148 dia.exec() |
150 dia.exec() |