472 dia = PipDialog(self.tr("Install Packages from Requirements")) |
472 dia = PipDialog(self.tr("Install Packages from Requirements")) |
473 res = dia.startProcess(interpreter, args) |
473 res = dia.startProcess(interpreter, args) |
474 if res: |
474 if res: |
475 dia.exec() |
475 dia.exec() |
476 |
476 |
|
477 def installEditableProject(self, interpreter, projectPath): |
|
478 """ |
|
479 Public method to install a project in development mode. |
|
480 |
|
481 @param interpreter interpreter to be used for execution |
|
482 @type str |
|
483 @param projectPath path of the project |
|
484 @type str |
|
485 """ |
|
486 if interpreter and projectPath: |
|
487 args = ["-m", "pip", "install"] |
|
488 if Preferences.getPip("PipSearchIndex"): |
|
489 indexUrl = Preferences.getPip("PipSearchIndex") + "/simple" |
|
490 args += ["--index-url", indexUrl] |
|
491 args += ["--editable", projectPath] |
|
492 |
|
493 dia = PipDialog(self.tr("Install Project")) |
|
494 res = dia.startProcess(interpreter, args) |
|
495 if res: |
|
496 dia.exec() |
|
497 |
477 def uninstallPackages(self, packages, venvName): |
498 def uninstallPackages(self, packages, venvName): |
478 """ |
499 """ |
479 Public method to uninstall the given list of packages. |
500 Public method to uninstall the given list of packages. |
480 |
501 |
481 @param packages list of packages to uninstall |
502 @param packages list of packages to uninstall |
1065 if localPackages: |
1077 if localPackages: |
1066 args.append("--local-only") |
1078 args.append("--local-only") |
1067 if usersite: |
1079 if usersite: |
1068 args.append("--user-only") |
1080 args.append("--user-only") |
1069 if summary: |
1081 if summary: |
1070 args.append("--summary") |
1082 args.append("--summary-by-license") |
1071 |
1083 |
1072 proc = QProcess() |
1084 proc = QProcess() |
1073 proc.start(interpreter, args) |
1085 proc.start(interpreter, args) |
1074 if proc.waitForStarted(15000) and proc.waitForFinished(30000): |
1086 if proc.waitForStarted(15000) and proc.waitForFinished(30000): |
1075 output = str( |
1087 output = str( |