mxcl/homebrew — pull request #20551 by samueljohn (2013-06-17 12:03:51+00:00)
Title: Python module dependencies and external python fix

Use the user's PATH when looking for an external
Python. Until now only brewed or OS X system's
python have been found by `depends_on :python`.

But now we support any Python in PATH (e.g.
pyenv's python).

Further, instead of handling python modules
and import tests in LanguageModuleDependency,
these are now handled by:

depends_on :python => 'numpy' # for example

The old style

depends_on 'numpy' => :python

is still supported and is only an alias
for the newer style (but only for :python, the
other languages are not altered by this commit).

The reasoning is that if a formula requires
a python module, it basically also needs
python itself - and further that specific
version of python has to provide the module.
So the `PythonInstalled` is the natural place
to check for the availability of a python
module.

Using a python module and other tags like
:optional or :recommended is done like so:

depends_on :python => [:optional, 'numpy']

Specifying another PyPi (Python Package index)
name than the module import name is seldom used
but supported, too:

depends_on :python => ['enchant'=>'pyenchant']