Skip to main content

Set of bash scripts that make bins installed in virtualenvs useful elsewhere.

Project description

Tools to install into a python virtualenv to make life easier. If you install virtualenv-bin into a virtualenv, you will get two useful programs.

venvbin

If you symlink to this program where it sits in a virtualenv and name the symlink for any program in the bin folder, executing the symlink will activate the virtualenv and then run the program, passing through all args and exit codes.

example

I want to install and use httpie, but I don’t want any of it’s dependencies interfering with my broader environment. Note: for this example, I use /opt/virtualenvs for all virtualenvs.

$ mkvirtualenv httpie
$ source /opt/virtualenvs/httpie/bin/activate
$ pip install --upgrade httpie
$ pip install virtualenv-bin
$ cd ~/bin
$ /opt/virtualenvs/httpie/bin/venvsymlinks
$ ~/bin/http --help

installation

You can install virtualenv-bin using pip:

$ pip install --upgrade virtualenv-bin

Project details


Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page