Some additional functions for working with remote virtualenvs in Fabric.
Project description
fabric-virtualenv provides Fabric functions for creating virtualenvs on remote servers, as well as installing packages to them, and running other Fabric operations in the context of the virtualenv.
fabvenv.virtualenv(path)
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 Fabric’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.
fabvenv.prepare_virtualenv()
Ensure a version of the virtualenv command is available on the remote server. If none exists, a standalone virtualenv.py script will be downloaded from the virtualenv github and saved as ~/virtualenv.py.
The virtualenv command that is prepared is available as env.virtualenv.
Changelog
0.2.1 - Fix bug in make_virtualenv with virtualenv.py installed by prepare_virtualenv.
0.2.0 - make_virtualenv now updates system_site_packages flag on previously-created virtualenvs.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fabric-virtualenv-0.3.0.tar.gz
.
File metadata
- Download URL: fabric-virtualenv-0.3.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cd280dfa85b52abdea1fa410d3952b7dbbec37a37901de920e4b9ff056d0949 |
|
MD5 | 93ccbd86513618dd6fce65438f2be52d |
|
BLAKE2b-256 | 284b73d397e8ee53b261176a44bc5d76f60d8122f210d96f57070f0d970227aa |
File details
Details for the file fabric_virtualenv-0.3.0-py2-none-any.whl
.
File metadata
- Download URL: fabric_virtualenv-0.3.0-py2-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5692c86d89bda6f0f99111c5c68c73897a47a3c51c2e7332221669b62c23fe46 |
|
MD5 | 344c4462eafa3d5945c70072c1d8edf5 |
|
BLAKE2b-256 | 60fed04398924c5cbd6ffff90ac504b9cf0e499785d47fc1728290f1bf0c3a1f |