aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSamuel John2013-08-27 16:29:07 +0200
committerSamuel John2013-08-27 16:34:31 +0200
commit6761ffb88d8c469d1a39053f4c1cda04cae71b4e (patch)
treea7af4fee8c56d5b244cf5be19ca23a78a4d76bc2 /Library
parent4e2dbef4336679663d3b3b3d6a8c4290daded22f (diff)
downloadhomebrew-6761ffb88d8c469d1a39053f4c1cda04cae71b4e.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')
-rw-r--r--Library/Homebrew/python_helper.rb4
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