Use-python plugin extension. Used to declare python location (use global if not declared) and specify required modules to install.
| Modifiers | Name | Description |
|---|---|---|
static enum |
PythonExtension.Scope |
Pip dependencies scope. |
| Type | Name and description |
|---|---|
boolean |
alwaysInstallModulesBy default, plugin will not call "pip install" for modules already installed (with exactly the same version). |
boolean |
envCopyCopy virtual environment instead of symlink (see --always-copy virtualenv option). |
java.lang.String |
envPathVirtual environment path to use. |
boolean |
installVirtualenvAutomatically install virtualenv (if pip modules used). |
java.lang.String |
minPipVersionMinimal required pip version. |
java.lang.String |
minPythonVersionMinimal required python version. |
java.util.List<java.lang.String> |
modulesPip modules to install. |
java.lang.String |
pythonBinaryPython binary name to use. |
java.lang.String |
pythonPathPath to python binary (folder where python executable is located). |
PythonExtension.Scope |
scopeInstalled pip packages scope. |
boolean |
showInstalledVersionsCalls 'pip list' to show all installed python modules (for problem investigations). |
| Type Params | Return Type | Name and description |
|---|---|---|
|
boolean |
isModuleDeclared(java.lang.String name)Checks if module is already declared. |
|
void |
pip(java.lang.String... modules)Shortcut for pip(java.lang.Iterable). |
|
void |
pip(java.lang.Iterable<java.lang.String> modules)Declare pip modules to install. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
By default, plugin will not call "pip install" for modules already installed (with exactly the same version). Enable option if you need to always call "pip install module" (for example, to make sure correct dependencies installed).
Copy virtual environment instead of symlink (see --always-copy virtualenv option). By default use default virtualenv behaviour: symlink environment.
Virtual environment path to use. Used only when scope is configured to use virtualenv. Virtualenv will be created automatically if not yet exists.
Automatically install virtualenv (if pip modules used). Will install for current user only (--user). Installed virtualenv will not be modified later, so you will need to manually update it in case of problems. When disabled, plugin will still check if virtualenv is available, but will not try to install it if not.
Minimal required pip version. Format is teh same as python version: "major.minor.micro". Any precision could be used (9, 8.2, etc). By default pip 9 is required.
Minimal required python version. Full format: "major.minor.micro". Any precision could be used, for example: '3' (python 3 or above), '3.2' (python. 3.2 or above), '3.6.1' (python 3.6.1 or above).
Pip modules to install. Modules are installed in the declaration order.
Duplicates are allowed: only the latest declaration will be used. So it is possible
to pre-define some modules (for example, in plugin) and then override module version
by adding new declaration (with pip ( .. ) method).
Use pip ( .. ) methods for modules declaration.
Python binary name to use. By default, for linux it would be python3 (if installed) or python and for windows - python.
Useful when you want to force python 2 usage on linux or python binary name differs.
Path to python binary (folder where python executable is located). When not set, global python is called. NOTE: automatically set when virtualenv is used (see {scope).
Installed pip packages scope.
Calls 'pip list' to show all installed python modules (for problem investigations). Enabled by default for faster problems detection (mostly to highlight used transitive dependencies versions).
Checks if module is already declared. Could be used by other plugins to test if required module is manually declared or not (in order to apply defaults).
name - module name to checkShortcut for pip(java.lang.Iterable).
modules - pip modules to installDeclare pip modules to install. Format: "moduleName:version". Only exact version matching is supported (pip support ranges, but this is intentionally not supported in order to avoid side effects).
Duplicate declarations are allowed: in this case the latest declaration will be used.
Note: if newer package version is already installed, pip will remove it and install correct version.
modules - pip modules to install