|
1 | 1 | .. _plugins: |
2 | 2 |
|
3 | | -=================== |
4 | | - Extension Plugins |
5 | | -=================== |
6 | | - |
7 | | -virtualenvwrapper includes several ways to modify its behavior. |
8 | | -End-users can use shell scripts or other programs for personal |
| 3 | +=========================== |
| 4 | +Extending Virtualenvwrapper |
| 5 | +=========================== |
| 6 | + |
| 7 | +Customizing one's development environment is a practice adopted from |
| 8 | +other tool-based jobs in which long experience leads to home-grown and |
| 9 | +unique solutions to persistent annoyances. Carpenters build jigs, |
| 10 | +software developers write shell scripts. virtualenvwrapper continues |
| 11 | +the tradition of encouraging a craftsman to modify his tools to work |
| 12 | +the way he wants, rather than the other way around. |
| 13 | + |
| 14 | +Use the hooks provided to eliminate repetitive manual operations and |
| 15 | +streamline your development workflow. For example, the pre_activate |
| 16 | +and post_activate hooks can trigger an IDE to load a project file to |
| 17 | +reload files from the last editing session, manage time-tracking |
| 18 | +records, or start and stop development versions of an application |
| 19 | +server. The initialize hook can be used to add entirely new commands |
| 20 | +and hooks to virtualenvwrapper. And the pre_mkvirtualenv and |
| 21 | +post_mkvirtualenv hooks give you an opportunity to install basic |
| 22 | +requirements into each new development environment, initialize a |
| 23 | +source code control repository, or otherwise set up a new project. |
| 24 | + |
| 25 | +There are two ways to attach your code so that virtualenvwrapper will |
| 26 | +run it: End-users can use shell scripts or other programs for personal |
9 | 27 | customization (see :ref:`scripts`). Extensions can also be |
10 | 28 | implemented in Python by using Distribute_ *entry points*, making it |
11 | | -possible to share common behaviors between systems. |
| 29 | +possible to share common behaviors between systems and developers. |
12 | 30 |
|
13 | 31 | Defining an Extension |
14 | 32 | ===================== |
@@ -262,7 +280,9 @@ initialize |
262 | 280 | ---------- |
263 | 281 |
|
264 | 282 | The ``virtualenvwrapper.initialize`` hooks are run each time |
265 | | -``virtualenvwrapper.sh`` is loaded into the user's environment. |
| 283 | +``virtualenvwrapper.sh`` is loaded into the user's environment. The |
| 284 | +initialize hook can be used to install templates for configuration |
| 285 | +files or otherwise prepare the system for proper plugin operation. |
266 | 286 |
|
267 | 287 | .. _plugins-pre_mkvirtualenv: |
268 | 288 |
|
@@ -338,4 +358,5 @@ The ``virtualenvwrapper.post_rmvirtualenv`` hooks are run just after |
338 | 358 | an environment is deleted. The name of the environment being deleted |
339 | 359 | is passed as the first argument. |
340 | 360 |
|
| 361 | + |
341 | 362 | .. _Distribute: http://packages.python.org/distribute/ |
0 commit comments