Virtualenv Support (paver.virtual) — Paver 1.1.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Paver 1.1.0 documentation »
- The Paver Standard Library »

# 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

    @task
    @virtualenv(dir="virtualenv")
    def t1():
        import some_module_existing_only_in_virtualenv

# paver.virtual Tasks

Tasks for managing virtualenv environments.

`paver.virtual.` `bootstrap`()

  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:

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

`paver.virtual.` `virtualenv`(dir)

  Run decorated task in specified virtual environment.

### Navigation

- index
- modules |
- next |
- previous |
- Paver 1.1.0 documentation »
- The Paver Standard Library »