src/eric7/PipInterface/Pip.py

branch
eric7
changeset 9323
6ae7193558ac
parent 9310
8ab45a4a6d96
child 9371
1da8bc75946f
child 9413
80c06d472826
--- a/src/eric7/PipInterface/Pip.py	Sun Sep 11 18:32:12 2022 +0200
+++ b/src/eric7/PipInterface/Pip.py	Mon Sep 12 18:07:42 2022 +0200
@@ -474,6 +474,27 @@
                 if res:
                     dia.exec()
 
+    def installEditableProject(self, interpreter, projectPath):
+        """
+        Public method to install a project in development mode.
+
+        @param interpreter interpreter to be used for execution
+        @type str
+        @param projectPath path of the project
+        @type str
+        """
+        if interpreter and projectPath:
+            args = ["-m", "pip", "install"]
+            if Preferences.getPip("PipSearchIndex"):
+                indexUrl = Preferences.getPip("PipSearchIndex") + "/simple"
+                args += ["--index-url", indexUrl]
+            args += ["--editable", projectPath]
+
+            dia = PipDialog(self.tr("Install Project"))
+            res = dia.startProcess(interpreter, args)
+            if res:
+                dia.exec()
+
     def uninstallPackages(self, packages, venvName):
         """
         Public method to uninstall the given list of packages.

eric ide

mercurial