Documentation/Source/eric6.Plugins.UiExtensionPlugins.PipInterface.Pip.html

changeset 6343
86cea8abd0f7
parent 6333
3d4e7155d48f
child 6619
1d34365c082c
diff -r c79ecba9cde7 -r 86cea8abd0f7 Documentation/Source/eric6.Plugins.UiExtensionPlugins.PipInterface.Pip.html
--- a/Documentation/Source/eric6.Plugins.UiExtensionPlugins.PipInterface.Pip.html	Tue Jun 12 19:01:06 2018 +0200
+++ b/Documentation/Source/eric6.Plugins.UiExtensionPlugins.PipInterface.Pip.html	Tue Jun 12 19:02:21 2018 +0200
@@ -78,9 +78,6 @@
 <td><a href="#Pip.__generateRequirements">__generateRequirements</a></td>
 <td>Private slot to generate the contents for a requirements file.</td>
 </tr><tr>
-<td><a href="#Pip.__getPython">__getPython</a></td>
-<td>Private method to derive the path to the python executable given the path to the pip executable.</td>
-</tr><tr>
 <td><a href="#Pip.__getUserConfig">__getUserConfig</a></td>
 <td>Private method to get the name of the user configuration file.</td>
 </tr><tr>
@@ -88,7 +85,7 @@
 <td>Private method to get the name of the virtualenv configuration file.</td>
 </tr><tr>
 <td><a href="#Pip.__handleTearOffMenu">__handleTearOffMenu</a></td>
-<td>Private slot to handle a change of the pip executable.</td>
+<td>Private slot to handle a change of the selected virtual environment.</td>
 </tr><tr>
 <td><a href="#Pip.__installLocalPackage">__installLocalPackage</a></td>
 <td>Private slot to install a package available on local storage.</td>
@@ -120,8 +117,8 @@
 <td><a href="#Pip.__searchPyPI">__searchPyPI</a></td>
 <td>Private slot to search the Python Package Index.</td>
 </tr><tr>
-<td><a href="#Pip.__selectPipExecutable">__selectPipExecutable</a></td>
-<td>Private method to select the pip executable to be used.</td>
+<td><a href="#Pip.__selectPipVirtualenv">__selectPipVirtualenv</a></td>
+<td>Private method to select the virtual environment to be used.</td>
 </tr><tr>
 <td><a href="#Pip.__uninstallPackages">__uninstallPackages</a></td>
 <td>Private slot to uninstall packages to be given by the user.</td>
@@ -132,17 +129,26 @@
 <td><a href="#Pip.__upgradePackages">__upgradePackages</a></td>
 <td>Private slot to upgrade packages to be given by the user.</td>
 </tr><tr>
+<td><a href="#Pip.getDefaultEnvironmentString">getDefaultEnvironmentString</a></td>
+<td>Public method to get the string for the default environment.</td>
+</tr><tr>
 <td><a href="#Pip.getMenu">getMenu</a></td>
 <td>Public method to get a reference to the requested menu.</td>
 </tr><tr>
 <td><a href="#Pip.getMenuNames">getMenuNames</a></td>
 <td>Public method to get the names of all menus.</td>
 </tr><tr>
+<td><a href="#Pip.getVirtualenvInterpreter">getVirtualenvInterpreter</a></td>
+<td>Public method to get the interpreter for a virtual environment.</td>
+</tr><tr>
+<td><a href="#Pip.getVirtualenvNames">getVirtualenvNames</a></td>
+<td>Public method to get a sorted list of virtual environment names.</td>
+</tr><tr>
 <td><a href="#Pip.initActions">initActions</a></td>
-<td>Public method to define the Django actions.</td>
+<td>Public method to define the actions.</td>
 </tr><tr>
 <td><a href="#Pip.initMenu">initMenu</a></td>
-<td>Public slot to initialize the Django menu.</td>
+<td>Public slot to initialize the menu.</td>
 </tr><tr>
 <td><a href="#Pip.installPackages">installPackages</a></td>
 <td>Public method to install the given list of packages.</td>
@@ -170,12 +176,12 @@
 <p>
         Constructor
 </p><dl>
-<dt><i>plugin</i></dt>
+<dt><i>plugin</i> (PipInterfacePlugin)</dt>
 <dd>
 reference to the plugin object
-</dd><dt><i>parent</i></dt>
+</dd><dt><i>parent</i> (QObject)</dt>
 <dd>
-parent (QObject)
+parent
 </dd>
 </dl><a NAME="Pip.__aboutToShowMenu" ID="Pip.__aboutToShowMenu"></a>
 <h4>Pip.__aboutToShowMenu</h4>
@@ -208,10 +214,10 @@
 <p>
         Private method to edit a configuration.
 </p><dl>
-<dt><i>virtualenv</i></dt>
+<dt><i>virtualenv</i> (bool)</dt>
 <dd>
 flag indicating to edit the current virtualenv
-            configuration file (boolean)
+            configuration file
 </dd>
 </dl><a NAME="Pip.__editUserConfiguration" ID="Pip.__editUserConfiguration"></a>
 <h4>Pip.__editUserConfiguration</h4>
@@ -228,28 +234,7 @@
 <b>__generateRequirements</b>(<i></i>)
 <p>
         Private slot to generate the contents for a requirements file.
-</p><a NAME="Pip.__getPython" ID="Pip.__getPython"></a>
-<h4>Pip.__getPython</h4>
-<b>__getPython</b>(<i>cmd</i>)
-<p>
-        Private method to derive the path to the python executable given the
-        path to the pip executable.
-</p><dl>
-<dt><i>cmd</i> (str)</dt>
-<dd>
-path of the pip executable
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-path of the python executable
-</dd>
-</dl><dl>
-<dt>Return Type:</dt>
-<dd>
-str
-</dd>
-</dl><a NAME="Pip.__getUserConfig" ID="Pip.__getUserConfig"></a>
+</p><a NAME="Pip.__getUserConfig" ID="Pip.__getUserConfig"></a>
 <h4>Pip.__getUserConfig</h4>
 <b>__getUserConfig</b>(<i></i>)
 <p>
@@ -257,7 +242,12 @@
 </p><dl>
 <dt>Returns:</dt>
 <dd>
-path of the user configuration file (string)
+path of the user configuration file
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+str
 </dd>
 </dl><a NAME="Pip.__getVirtualenvConfig" ID="Pip.__getVirtualenvConfig"></a>
 <h4>Pip.__getVirtualenvConfig</h4>
@@ -267,17 +257,22 @@
 </p><dl>
 <dt>Returns:</dt>
 <dd>
-path of the virtualenv configuration file (string)
+path of the virtualenv configuration file
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+str
 </dd>
 </dl><a NAME="Pip.__handleTearOffMenu" ID="Pip.__handleTearOffMenu"></a>
 <h4>Pip.__handleTearOffMenu</h4>
-<b>__handleTearOffMenu</b>(<i>pip</i>)
+<b>__handleTearOffMenu</b>(<i>venvName</i>)
 <p>
-        Private slot to handle a change of the pip executable.
+        Private slot to handle a change of the selected virtual environment.
 </p><dl>
-<dt><i>pip</i> (str)</dt>
+<dt><i>venvName</i> (str)</dt>
 <dd>
-path of the pip executable
+logical name of the virtual environment
 </dd>
 </dl><a NAME="Pip.__installLocalPackage" ID="Pip.__installLocalPackage"></a>
 <h4>Pip.__installLocalPackage</h4>
@@ -345,11 +340,11 @@
 <b>__searchPyPI</b>(<i></i>)
 <p>
         Private slot to search the Python Package Index.
-</p><a NAME="Pip.__selectPipExecutable" ID="Pip.__selectPipExecutable"></a>
-<h4>Pip.__selectPipExecutable</h4>
-<b>__selectPipExecutable</b>(<i></i>)
+</p><a NAME="Pip.__selectPipVirtualenv" ID="Pip.__selectPipVirtualenv"></a>
+<h4>Pip.__selectPipVirtualenv</h4>
+<b>__selectPipVirtualenv</b>(<i></i>)
 <p>
-        Private method to select the pip executable to be used.
+        Private method to select the virtual environment to be used.
 </p><a NAME="Pip.__uninstallPackages" ID="Pip.__uninstallPackages"></a>
 <h4>Pip.__uninstallPackages</h4>
 <b>__uninstallPackages</b>(<i></i>)
@@ -365,22 +360,42 @@
 <b>__upgradePackages</b>(<i></i>)
 <p>
         Private slot to upgrade packages to be given by the user.
-</p><a NAME="Pip.getMenu" ID="Pip.getMenu"></a>
+</p><a NAME="Pip.getDefaultEnvironmentString" ID="Pip.getDefaultEnvironmentString"></a>
+<h4>Pip.getDefaultEnvironmentString</h4>
+<b>getDefaultEnvironmentString</b>(<i></i>)
+<p>
+        Public method to get the string for the default environment.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+string for the default environment
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl><a NAME="Pip.getMenu" ID="Pip.getMenu"></a>
 <h4>Pip.getMenu</h4>
 <b>getMenu</b>(<i>name</i>)
 <p>
         Public method to get a reference to the requested menu.
 </p><dl>
-<dt><i>name</i></dt>
+<dt><i>name</i> (str)</dt>
 <dd>
-name of the menu (string)
+name of the menu
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-reference to the menu (QMenu) or None, if no
+reference to the menu or None, if no
             menu with the given name exists
 </dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+QMenu or None
+</dd>
 </dl><a NAME="Pip.getMenuNames" ID="Pip.getMenuNames"></a>
 <h4>Pip.getMenuNames</h4>
 <b>getMenuNames</b>(<i></i>)
@@ -389,35 +404,80 @@
 </p><dl>
 <dt>Returns:</dt>
 <dd>
-menu names (list of string)
+menu names
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+list of str
+</dd>
+</dl><a NAME="Pip.getVirtualenvInterpreter" ID="Pip.getVirtualenvInterpreter"></a>
+<h4>Pip.getVirtualenvInterpreter</h4>
+<b>getVirtualenvInterpreter</b>(<i>venvName</i>)
+<p>
+        Public method to get the interpreter for a virtual environment.
+</p><dl>
+<dt><i>venvName</i> (str)</dt>
+<dd>
+logical name for the virtual environment
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+interpreter path
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl><a NAME="Pip.getVirtualenvNames" ID="Pip.getVirtualenvNames"></a>
+<h4>Pip.getVirtualenvNames</h4>
+<b>getVirtualenvNames</b>(<i></i>)
+<p>
+        Public method to get a sorted list of virtual environment names.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+sorted list of virtual environment names
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+list of str
 </dd>
 </dl><a NAME="Pip.initActions" ID="Pip.initActions"></a>
 <h4>Pip.initActions</h4>
 <b>initActions</b>(<i></i>)
 <p>
-        Public method to define the Django actions.
+        Public method to define the actions.
 </p><a NAME="Pip.initMenu" ID="Pip.initMenu"></a>
 <h4>Pip.initMenu</h4>
 <b>initMenu</b>(<i></i>)
 <p>
-        Public slot to initialize the Django menu.
+        Public slot to initialize the menu.
 </p><dl>
 <dt>Returns:</dt>
 <dd>
-the menu generated (QMenu)
+the menu generated
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+QMenu
 </dd>
 </dl><a NAME="Pip.installPackages" ID="Pip.installPackages"></a>
 <h4>Pip.installPackages</h4>
-<b>installPackages</b>(<i>packages, cmd="", userSite=False</i>)
+<b>installPackages</b>(<i>packages, venvName="", userSite=False</i>)
 <p>
         Public method to install the given list of packages.
 </p><dl>
 <dt><i>packages</i> (list of str)</dt>
 <dd>
 list of packages to install
-</dd><dt><i>cmd</i> (str)</dt>
+</dd><dt><i>venvName</i> (str)</dt>
 <dd>
-pip command to be used
+name of the virtual environment to be used
 </dd><dt><i>userSite</i> (bool)</dt>
 <dd>
 flag indicating an install to the user install
@@ -425,7 +485,7 @@
 </dd>
 </dl><a NAME="Pip.runProcess" ID="Pip.runProcess"></a>
 <h4>Pip.runProcess</h4>
-<b>runProcess</b>(<i>args, cmd=""</i>)
+<b>runProcess</b>(<i>args, interpreter</i>)
 <p>
         Public method to execute the current pip with the given arguments.
 </p><p>
@@ -435,9 +495,9 @@
 <dt><i>args</i> (list of str)</dt>
 <dd>
 list of command line arguments
-</dd><dt><i>cmd</i> (str)</dt>
+</dd><dt><i>interpreter</i> (str)</dt>
 <dd>
-pip executable to be used
+path of the Python interpreter to be used
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
@@ -452,34 +512,39 @@
 </dd>
 </dl><a NAME="Pip.uninstallPackages" ID="Pip.uninstallPackages"></a>
 <h4>Pip.uninstallPackages</h4>
-<b>uninstallPackages</b>(<i>packages, cmd=""</i>)
+<b>uninstallPackages</b>(<i>packages, venvName=""</i>)
 <p>
         Public method to uninstall the given list of packages.
 </p><dl>
-<dt><i>packages</i></dt>
+<dt><i>packages</i> (list of str)</dt>
 <dd>
-list of packages to uninstall (list of string)
-</dd><dt><i>cmd</i></dt>
+list of packages to uninstall
+</dd><dt><i>venvName</i> (str)</dt>
 <dd>
-pip command to be used (string)
+name of the virtual environment to be used
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-flag indicating a successful execution (boolean)
+flag indicating a successful execution
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+bool
 </dd>
 </dl><a NAME="Pip.upgradePackages" ID="Pip.upgradePackages"></a>
 <h4>Pip.upgradePackages</h4>
-<b>upgradePackages</b>(<i>packages, cmd="", userSite=False</i>)
+<b>upgradePackages</b>(<i>packages, venvName="", userSite=False</i>)
 <p>
         Public method to upgrade the given list of packages.
 </p><dl>
 <dt><i>packages</i> (list of str)</dt>
 <dd>
 list of packages to upgrade
-</dd><dt><i>cmd</i> (str)</dt>
+</dd><dt><i>venvName</i> (str)</dt>
 <dd>
-pip command to be used
+name of the virtual environment to be used
 </dd><dt><i>userSite</i> (bool)</dt>
 <dd>
 flag indicating an install to the user install
@@ -497,13 +562,13 @@
 </dd>
 </dl><a NAME="Pip.upgradePip" ID="Pip.upgradePip"></a>
 <h4>Pip.upgradePip</h4>
-<b>upgradePip</b>(<i>pip="", userSite=False</i>)
+<b>upgradePip</b>(<i>venvName="", userSite=False</i>)
 <p>
         Public method to upgrade pip itself.
 </p><dl>
-<dt><i>pip</i> (str)</dt>
+<dt><i>venvName</i> (str)</dt>
 <dd>
-pip command to be used
+name of the virtual environment to be used
 </dd><dt><i>userSite</i> (bool)</dt>
 <dd>
 flag indicating an install to the user install

eric ide

mercurial