diff options
| author | Samuel John | 2013-06-17 09:06:38 +0200 |
|---|---|---|
| committer | Samuel John | 2013-06-18 10:30:17 +0200 |
| commit | a3a0146d7ccd89755439f1b8be7e1dd28b75a88b (patch) | |
| tree | ed6a13c7cfc3c12d7db24a2f100b1ee37e48cbad /Library/Homebrew/test/test_string.rb | |
| parent | c5f9f42e51c8c4762dc49e966c286c09d4e9a4b2 (diff) | |
| download | brew-a3a0146d7ccd89755439f1b8be7e1dd28b75a88b.tar.bz2 | |
Python module deps, ext. python fix and 10.6 fix
* Fixes Homebrew/homebrew#20572 by tweaking the logic that decides
which python is used by the `python` object
inside a formula. There was a bug when on 10.6
there is no Python 2.7 but a :recommended
Python was still treated as being available.
* 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 (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']
A last note: For clarity, you can define
multiple depends_on statements with different
modules to be importable.`
Diffstat (limited to 'Library/Homebrew/test/test_string.rb')
0 files changed, 0 insertions, 0 deletions
