Skip to content

Commit 47aa40a

Browse files
committed
include more motivational background
1 parent 1d58dab commit 47aa40a

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

docs/source/plugins.rst

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
.. _plugins:
22

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
927
customization (see :ref:`scripts`). Extensions can also be
1028
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.
1230

1331
Defining an Extension
1432
=====================
@@ -262,7 +280,9 @@ initialize
262280
----------
263281

264282
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.
266286

267287
.. _plugins-pre_mkvirtualenv:
268288

@@ -338,4 +358,5 @@ The ``virtualenvwrapper.post_rmvirtualenv`` hooks are run just after
338358
an environment is deleted. The name of the environment being deleted
339359
is passed as the first argument.
340360

361+
341362
.. _Distribute: http://packages.python.org/distribute/

0 commit comments

Comments
 (0)