public class Virtualenv extends Python
Constructor and Description |
---|
Virtualenv(hudson.FilePath home)
Constructor using fields
|
Modifier and Type | Method and Description |
---|---|
boolean |
buildout(hudson.Launcher launcher,
hudson.model.TaskListener listener,
Workspace workspace,
hudson.FilePath pwd,
hudson.EnvVars environment,
String buildoutCfg)
Bootstrap BUILDOUT and start its binary.
|
boolean |
create(hudson.Launcher launcher,
hudson.model.TaskListener listener,
Workspace workspace,
hudson.FilePath pwd,
hudson.EnvVars environment,
Python interpreter,
boolean systemSitePackages)
Create this VIRTUALENV
|
void |
delete()
Delete this VIRTUALENV
|
Map<String,String> |
getEnvironment(boolean includeHomeKey)
Get the environment for this interpreter.
|
hudson.FilePath |
getExecutable()
Get the PYTHON executable.
|
static String |
getSignature(Workspace workspace,
Python interpreter,
boolean systemSitePackages)
Get a virtual environment signature.
|
hudson.FilePath |
getSignatureFile()
Get the signature file path.
|
boolean |
isOutdated(Workspace workspace,
Python interpreter,
boolean systemSitePackages)
Check if this VIRTUALENV is out dated.
|
boolean |
isValid()
Check if this is a valid interpreter.
|
Virtualenv |
isVirtualenv()
Is this a VIRTUALENV?
|
boolean |
pipInstall(hudson.Launcher launcher,
hudson.model.TaskListener listener,
Workspace workspace,
hudson.FilePath pwd,
hudson.EnvVars environment,
String packageName)
Install a package with PIP.
|
boolean |
tox(hudson.Launcher launcher,
hudson.model.TaskListener listener,
hudson.FilePath pwd,
hudson.EnvVars environment,
String toxIni,
boolean recreate)
Call TOX.
|
fromHome, getEnvironment, getHome, isCPython, isExecutable, isIronPython, isJython, isPyPy, isUnix, isWindows
public Virtualenv(hudson.FilePath home) throws IOException, InterruptedException
home
- The home folderInterruptedException
IOException
public Virtualenv isVirtualenv()
Python
isVirtualenv
in class Python
public boolean isValid() throws IOException, InterruptedException
Python
isValid
in class Python
IOException
InterruptedException
public Map<String,String> getEnvironment(boolean includeHomeKey) throws IOException, InterruptedException
Python
getEnvironment
in class Python
includeHomeKey
- If true, add home variable such as PYTHONHOMEIOException
InterruptedException
public hudson.FilePath getExecutable() throws IOException, InterruptedException
Python
getExecutable
in class Python
IOException
InterruptedException
public boolean isOutdated(Workspace workspace, Python interpreter, boolean systemSitePackages) throws IOException, InterruptedException
workspace
- The workspaceinterpreter
- The interpretersystemSitePackages
- True if include system packages, else falseIOException
InterruptedException
public hudson.FilePath getSignatureFile()
public void delete() throws IOException, InterruptedException
IOException
InterruptedException
public boolean create(hudson.Launcher launcher, hudson.model.TaskListener listener, Workspace workspace, hudson.FilePath pwd, hudson.EnvVars environment, Python interpreter, boolean systemSitePackages) throws InterruptedException, IOException
launcher
- The launcherlistener
- The listenerworkspace
- The workspacepwd
- The working directoryenvironment
- The environmentinterpreter
- The interpretersystemSitePackages
- Give access to the global site-packages directoryInterruptedException
IOException
public boolean pipInstall(hudson.Launcher launcher, hudson.model.TaskListener listener, Workspace workspace, hudson.FilePath pwd, hudson.EnvVars environment, String packageName) throws InterruptedException, IOException
launcher
- The launcherlistener
- The listenerworkspace
- The workspacepwd
- The working directoryenvironment
- The environmentpackageName
- The package to installInterruptedException
IOException
public boolean tox(hudson.Launcher launcher, hudson.model.TaskListener listener, hudson.FilePath pwd, hudson.EnvVars environment, String toxIni, boolean recreate) throws InterruptedException, IOException
launcher
- The launcherlistener
- The listenerpwd
- The working directoryenvironment
- The environmenttoxIni
- The tox.ini filerecreate
- If true recreate the environmentsInterruptedException
IOException
public boolean buildout(hudson.Launcher launcher, hudson.model.TaskListener listener, Workspace workspace, hudson.FilePath pwd, hudson.EnvVars environment, String buildoutCfg) throws InterruptedException, IOException
launcher
- The launcherlistener
- The listenerworkspace
- The workspacepwd
- The working folderenvironment
- The environmentbuildoutCfg
- The BUILDOUT configuration fileInterruptedException
IOException
public static String getSignature(Workspace workspace, Python interpreter, boolean systemSitePackages) throws IOException, InterruptedException
workspace
- The workspaceinterpreter
- The interpretersystemSitePackages
- Use system packagesIOException
InterruptedException
Copyright © 2004-2018. All Rights Reserved.