diff options
| author | Samuel John | 2013-08-27 16:29:07 +0200 |
|---|---|---|
| committer | Samuel John | 2013-08-27 16:34:31 +0200 |
| commit | ed461359a71ec31c14c0a5e2e4b1103357d02036 (patch) | |
| tree | 438080e7f38413175c2b103b2ffe9163a4564c70 /Library/Homebrew/python_helper.rb | |
| parent | 2e2e46b5b4d7d1e697d904a065cb51ce8704f880 (diff) | |
| download | brew-ed461359a71ec31c14c0a5e2e4b1103357d02036.tar.bz2 | |
PythonInstalled: set PYTHONPATH, not prepend
An issue could arise when brewing a formula that
has Python 2.x and 3.x support and 2.x is the system Python
but 3.x is a brewed one. The idea about prepending was that
user configured PYTHONPATH could be used in formulae.
Now, instead and if needed, inside the `python do` block
one can still append to PYTHONPATH.
Diffstat (limited to 'Library/Homebrew/python_helper.rb')
| -rw-r--r-- | Library/Homebrew/python_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/python_helper.rb b/Library/Homebrew/python_helper.rb index 826bc60f5..d5ccbd5bd 100644 --- a/Library/Homebrew/python_helper.rb +++ b/Library/Homebrew/python_helper.rb @@ -60,9 +60,9 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block) # In order to install into the Cellar, the dir must exist and be in the # PYTHONPATH. This will be executed in the context of the formula # so that lib points to the HOMEBREW_PREFIX/Cellar/<formula>/<version>/lib - puts "brew: Prepending to PYTHONPATH: #{py.site_packages}" if ARGV.verbose? + puts "brew: setting PYTHONPATH to: #{py.site_packages}" if ARGV.verbose? mkdir_p py.site_packages - ENV.prepend_path 'PYTHONPATH', py.site_packages + ENV['PYTHONPATH'] = py.site_packages ENV['PYTHON'] = py.binary ENV.prepend_path 'CMAKE_INCLUDE_PATH', py.incdir ENV.prepend_path 'PKG_CONFIG_PATH', py.pkg_config_path if py.pkg_config_path |
