Virtualenv Support (paver.virtual)

Paver makes it easy to set up virtualenv environments for development and deployment. Virtualenv gives you a place to install Python packages and keep them separate from your main system’s Python installation.

Using virtualenv with tasks

You may specify which virtual environment should particular task use. Do this with @virtualenv decorator:

from paver.easy import task
from paver.virtual import virtualenv

def t1():
    import some_module_existing_only_in_virtualenv

paver.virtual Tasks

Tasks for managing virtualenv environments.


Creates a virtualenv bootstrap script. The script will create a bootstrap script that populates a virtualenv in the current directory. The environment will have paver, the packages of your choosing and will run the paver command of your choice.

This task looks in the virtualenv options for:

name of the generated script
packages to install with easy_install. The version of paver that you are using is included automatically. This should be a list of strings.
run this paver command line after installation (just the command line arguments, not the paver command itself).
the destination directory for the virtual environment (defaults to ‘.’)
don’t give access to the global site-packages dir to the virtual environment (defaults to False)
unzip Setuptools when installing it (defaults to False)

Run decorated task in specified virtual environment.

Table Of Contents

Previous topic

Miscellaneous Tasks (paver.misctasks)

Next topic

Using with Subversion (paver.svn)

This Page