From ed461359a71ec31c14c0a5e2e4b1103357d02036 Mon Sep 17 00:00:00 2001 From: Samuel John Date: Tue, 27 Aug 2013 16:29:07 +0200 Subject: 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. --- Library/Homebrew/python_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/python_helper.rb') 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///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 -- cgit v1.2.3