@@ -41,9 +41,37 @@ add it to your user local directory (usually `~/.local`).
41
41
42
42
$ pip install --install-option="--user" virtualenvwrapper
43
43
44
- WORKON_HOME
44
+ .. _install-shell-config :
45
+
46
+ Shell Startup File
47
+ ==================
48
+
49
+ Add two lines to your shell startup file (``.bashrc ``, ``.profile ``,
50
+ etc.) to set the location where the virtual environments should live
51
+ and the location of the script installed with this package::
52
+
53
+ export WORKON_HOME=$HOME/.virtualenvs
54
+ source /usr/local/bin/virtualenvwrapper.sh
55
+
56
+ After editing it, reload the startup file (e.g., run ``source
57
+ ~/.bashrc ``).
58
+
59
+ Quick-Start
45
60
===========
46
61
62
+ 1. Run: ``workon ``
63
+ 2. A list of environments, empty, is printed.
64
+ 3. Run: ``mkvirtualenv temp ``
65
+ 4. A new environment, ``temp `` is created and activated.
66
+ 5. Run: ``workon ``
67
+ 6. This time, the ``temp `` environment is included.
68
+
69
+ Customization
70
+ =============
71
+
72
+ WORKON_HOME
73
+ -----------
74
+
47
75
The variable ``WORKON_HOME `` tells virtualenvwrapper where to place
48
76
your virtual environments. The default is ``$HOME/.virtualenvs ``. If
49
77
the directory does not exist when virtualenvwrapper is loaded, it will
@@ -52,7 +80,7 @@ be created automatically.
52
80
.. _variable-VIRTUALENVWRAPPER_HOOK_DIR :
53
81
54
82
VIRTUALENVWRAPPER_HOOK_DIR
55
- ==========================
83
+ --------------------------
56
84
57
85
The variable ``VIRTUALENVWRAPPER_HOOK_DIR `` tells virtualenvwrapper
58
86
where the user-defined hooks should be placed. The default is
@@ -61,35 +89,20 @@ where the user-defined hooks should be placed. The default is
61
89
.. _variable-VIRTUALENVWRAPPER_LOG_DIR :
62
90
63
91
VIRTUALENVWRAPPER_LOG_DIR
64
- ==========================
92
+ -------------------------
65
93
66
94
The variable ``VIRTUALENVWRAPPER_LOG_DIR `` tells virtualenvwrapper
67
95
where the user-defined logs should be written. The default is
68
96
``$WORKON_HOME ``.
69
97
70
- .. _install-shell-config :
71
-
72
- Shell Startup File
73
- ==================
74
-
75
- Add two lines to your shell startup file (``.bashrc ``, ``.profile ``,
76
- etc.) to set the location where the virtual environments should live
77
- and the location of the script installed with this package::
78
-
79
- export WORKON_HOME=$HOME/.virtualenvs
80
- source /usr/local/bin/virtualenvwrapper.sh
81
-
82
- After editing it, reload the startup file (e.g., run: ``source
83
- ~/.bashrc ``).
84
-
85
98
.. _variable-VIRTUALENVWRAPPER_VIRTUALENV :
86
99
87
100
.. _variable-VIRTUALENVWRAPPER_VIRTUALENV_ARGS :
88
101
89
102
.. _variable-VIRTUALENVWRAPPER_PYTHON :
90
103
91
104
Python Interpreter, virtualenv, and $PATH
92
- =========================================
105
+ -----------------------------------------
93
106
94
107
During startup, ``virtualenvwrapper.sh `` finds the first ``python ``
95
108
and ``virtualenv `` programs on the ``$PATH `` and remembers them to use
@@ -114,7 +127,7 @@ sourcing ``virtualenvwrapper.sh``. For example::
114
127
source /usr/local/bin/virtualenvwrapper.sh
115
128
116
129
Default Arguments for virtualenv
117
- ================================
130
+ --------------------------------
118
131
119
132
If the application identified by ``VIRTUALENVWRAPPER_VIRTUALENV ``
120
133
needs arguments, they can be set in
@@ -127,24 +140,33 @@ environments are isolated from the system ``site-packages`` directory.
127
140
128
141
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
129
142
130
- Quick-Start
131
- ===========
132
-
133
- 1. Run: ``workon ``
134
- 2. A list of environments, empty, is printed.
135
- 3. Run: ``mkvirtualenv temp ``
136
- 4. A new environment, ``temp `` is created and activated.
137
- 5. Run: ``workon ``
138
- 6. This time, the ``temp `` environment is included.
139
-
140
143
Temporary Files
141
- ===============
144
+ ---------------
142
145
143
146
virtualenvwrapper creates temporary files in ``$TMPDIR ``. If the
144
147
variable is not set, it uses ``/tmp ``. To change the location of
145
148
temporary files just for virtualenvwrapper, set
146
149
``VIRTUALENVWRAPPER_TMPDIR ``.
147
150
151
+ Site-wide Configuration
152
+ -----------------------
153
+
154
+ Most UNIX systems include the ability to change the configuration for
155
+ all users. This typically takes one of two forms: editing the
156
+ *skeleton * files for new accounts or editing the global startup file
157
+ for a shell.
158
+
159
+ Editing the skeleton files for new accounts means that each new user
160
+ will have their private startup files preconfigured to load
161
+ virtualenvwrapper. They can disable it by commenting out or removing
162
+ those lines. Refer to the documentation for the shell and operating
163
+ system to identify the appropriate file to edit.
164
+
165
+ Modifying the global startup file for a given shell means that all
166
+ users of that shell will have virtualenvwrapper enabled, and they
167
+ cannot disable it. Refer to the documentation for the shell to
168
+ identify the appropriate file to edit.
169
+
148
170
Upgrading from 1.x
149
171
==================
150
172
0 commit comments