aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorSamuel John2013-08-23 20:26:39 +0200
committerSamuel John2013-08-23 20:26:47 +0200
commitc4d8917f3f1c1cbfdaa5049d720db315b531bbbc (patch)
tree419841b9af790ab1b91f36ff5ffd47003335dc61 /Library/Homebrew
parent84369dd94900b2406566d45d4ca5e95f2f2a26fc (diff)
downloadbrew-c4d8917f3f1c1cbfdaa5049d720db315b531bbbc.tar.bz2
PythonInstalled: Unset PYTHONPATH for `satisfied?`
When a formula `depends_on :python` *and* `depends_on :python3` the `modify_build_environment` method sets the PYTHONPATH and the Python 3.x requirement then fails because it finds the sitecustomize.py from Python 2.x in the PYTHONPATH.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/requirements/python_dependency.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb
index fee1b5bd3..5d7e0aed6 100644
--- a/Library/Homebrew/requirements/python_dependency.rb
+++ b/Library/Homebrew/requirements/python_dependency.rb
@@ -74,6 +74,7 @@ class PythonInstalled < Requirement
# We look for a brewed python or an external Python and store the loc of
# that binary for later usage. (See Formula#python)
satisfy :build_env => false do
+ ENV['PYTHONPATH'] = nil
@unsatisfied_because = ''
if binary.nil? || !binary.executable?
@unsatisfied_because += "No `#{@name}` found in your PATH! Consider to `brew install #{@name}`."