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.
This commit is contained in:
Samuel John committed 2013-08-23 20:26:47 +02:00
1 parent e071076c21
commit 6596db2bd9
1 file changed
+1
@@ -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}`."