aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSamuel John2013-08-23 20:26:39 +0200
committerSamuel John2013-08-23 20:26:47 +0200
commit6596db2bd982b4d40c798f3c93daa4e2a963af44 (patch)
tree2f82052507ec923bf68ab00d1fa106b5bc395d9e /Library
parente071076c215450c8a3d8cc35ca2a15ec3dbd73a6 (diff)
downloadhomebrew-6596db2bd982b4d40c798f3c93daa4e2a963af44.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')
-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}`."