Browse files

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.
  • Loading branch information...
1 parent e071076 commit 6596db2bd982b4d40c798f3c93daa4e2a963af44 @samueljohn samueljohn committed Aug 23, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 Library/Homebrew/requirements/python_dependency.rb
View
1 Library/Homebrew/requirements/python_dependency.rb
@@ -74,6 +74,7 @@ def initialize(default_version="2.6", tags=[])
# 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}`."

0 comments on commit 6596db2

Please sign in to comment.