diff options
| author | Samuel John | 2013-08-08 11:48:16 +0200 |
|---|---|---|
| committer | Samuel John | 2013-08-08 11:48:16 +0200 |
| commit | fe61524e03708923aa9120c09785f810e0b55f2a (patch) | |
| tree | 16c82b27c7f40a57f0873c7846c78ce524f8e333 /Library/Homebrew/python_helper.rb | |
| parent | 0456e7e5a58321e5bfbb39f87e1b3b56609a5643 (diff) | |
| download | brew-fe61524e03708923aa9120c09785f810e0b55f2a.tar.bz2 | |
python_helper prepends PYTHONPATH
…instead of appending. This should be safer against any
malformed user-defined values in the PYTHONPATH.
Diffstat (limited to 'Library/Homebrew/python_helper.rb')
| -rw-r--r-- | Library/Homebrew/python_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/python_helper.rb b/Library/Homebrew/python_helper.rb index b121ca5d7..3fd501bb2 100644 --- a/Library/Homebrew/python_helper.rb +++ b/Library/Homebrew/python_helper.rb @@ -1,4 +1,4 @@ -# This is used in the Formula class when the user calls +# This helper method is used in the Formula class when the user calls # `python`, `python2` or `python3`. # This method has a dual nature. For one, it takes a &block and sets up @@ -65,9 +65,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: Appending to PYTHONPATH: #{py.site_packages}" if ARGV.verbose? + puts "brew: Prepending to PYTHONPATH: #{py.site_packages}" if ARGV.verbose? mkdir_p py.site_packages - ENV.append 'PYTHONPATH', py.site_packages, ':' + ENV.prepend 'PYTHONPATH', py.site_packages, ':' ENV['PYTHON'] = py.binary ENV.prepend 'CMAKE_INCLUDE_PATH', py.incdir, ':' ENV.prepend 'PKG_CONFIG_PATH', py.pkg_config_path, ':' if py.pkg_config_path |
