Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Some additional functions for working with remote virtualenvs in Fabric3.

Project description

fabric3-virtualenv - Fabric3 functions for working with remote virtualenvs

fabric3-virtualenv provides Fabric3 functions for creating virtualenvs on remote
servers, as well as installing packages to them, and running other Fabric3
operations in the context of the virtualenv.


A context manager that performs all nested operations in the context of the
virtualenv `path`.

For example::

>>> from fabvenv import virtualenv
>>> with virtualenv('/home/me/venv/'):
... run('python foo')

It is highly recommended to use an absolute path, as Fabric3's ``cd()``
contextmanager is always applied BEFORE ``virtualenv()``, regardless of how
they are nested.

``fabvenv.make_virtualenv(path, dependencies=[], eggs=[], system_site_packages=True)``

Create or update a virtualenv in path, installing the given packages and eggs.

* ``path`` - The path to the virtualenv. This path will be created if it does not already exist.
* ``dependencies`` - a list of paths or URLs to Python packages to install with ``pip``.
* ``eggs`` - a list of paths or URLs to eggs to install with ``easy_install``. Eggs can be used to speed up deployments that require libraries to be compiled.
* ``system_site_packages`` - If True, the newly-created virtualenv will expose the system site package. If False, these will be hidden.
* ``python_binary`` - If not None, should be the path to python binary that will be used to create the virtualenv.


Ensure a version of the ``virtualenv`` command is available on the remote
server. If none exists, a standalone script will be
downloaded from the virtualenv github and saved as ``~/``.

The virtualenv command that is prepared is available as ``env.virtualenv``.


* **0.2.1** - Fix bug in make_virtualenv with installed by prepare_virtualenv.

* **0.2.0** - make_virtualenv now updates ``system_site_packages`` flag on previously-created virtualenvs.

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fabric3-virtualenv, version 0.3.1
Filename, size File type Python version Upload date Hashes
Filename, size fabric3_virtualenv-0.3.1-py3-none-any.whl (5.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page