aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 3ddcf66bae21ab6bbde6af8ddfe4ee732fd74000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
VENV WORKON
===========

A very simple wrapper around python3's venv. This little script
allows creating and using venvs well tucked away from your project
code.

## Install
Put the `venvworkon.sh` script somewhere and source it in your
`~/.profile` or `~/.bashrc` file.

## Usage
The script only supports one usage mode:

    $ workon [environment]

If *environment* is not provided, then the list of existing venvs
will be printed instead.

## Where venvs are created
When `workon` is called, venvs are created or loaded from the
`$HOME/.venvs` folder.

## Post-load script
If the file `$HOME/.venvs/<venv>/postload.sh` exists, it is
automatically sourced after the venv is loaded. This is useful
to export environment variable such as `DJANGO_SETTINGS_MODULE`.

## Why bother using this
`virtualenvwrapper` is certainly much more feature-packed and
useful than this. But this wrapper is handy for development and
uses the light-weight `pyvenv` rather than virtualenv. Up to you.