PythonVirtualenvPreparer

public class PythonVirtualenvPreparer
extends BaseTargetPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.PythonVirtualenvPreparer


Sets up a Python virtualenv on the host and installs packages. To activate it, the working directory is changed to the root of the virtualenv.

Summary

Constants

String PYTHONPATH

Fields

String mPip

IRunUtil mRunUtil

Public constructors

PythonVirtualenvPreparer()

Public methods

void setUp(ITestDevice device, IBuildInfo buildInfo)

Protected methods

void addDepModule(String module)
void installDeps(IBuildInfo buildInfo, ITestDevice device)
void setRequirementsFile(File f)
void startVirtualenv(IBuildInfo buildInfo, ITestDevice device)

Constants

PYTHONPATH

String PYTHONPATH

Constant Value: "PYTHONPATH"

Fields

mPip

String mPip

mRunUtil

IRunUtil mRunUtil

Public constructors

PythonVirtualenvPreparer

PythonVirtualenvPreparer ()

Public methods

setUp

void setUp (ITestDevice device, 
                IBuildInfo buildInfo)

Parameters
device ITestDevice

buildInfo IBuildInfo

Throws
TargetSetupError
BuildError
DeviceNotAvailableException

Protected methods

addDepModule

void addDepModule (String module)

Parameters
module String

installDeps

void installDeps (IBuildInfo buildInfo, 
                ITestDevice device)

Parameters
buildInfo IBuildInfo

device ITestDevice

Throws
TargetSetupError

setRequirementsFile

void setRequirementsFile (File f)

Parameters
f File

startVirtualenv

void startVirtualenv (IBuildInfo buildInfo, 
                ITestDevice device)

Parameters
buildInfo IBuildInfo

device ITestDevice

Throws
TargetSetupError