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:
parent
84369dd949
commit
c4d8917f3f
@ -74,6 +74,7 @@ class PythonInstalled < Requirement
|
|||||||
# We look for a brewed python or an external Python and store the loc of
|
# We look for a brewed python or an external Python and store the loc of
|
||||||
# that binary for later usage. (See Formula#python)
|
# that binary for later usage. (See Formula#python)
|
||||||
satisfy :build_env => false do
|
satisfy :build_env => false do
|
||||||
|
ENV['PYTHONPATH'] = nil
|
||||||
@unsatisfied_because = ''
|
@unsatisfied_because = ''
|
||||||
if binary.nil? || !binary.executable?
|
if binary.nil? || !binary.executable?
|
||||||
@unsatisfied_because += "No `#{@name}` found in your PATH! Consider to `brew install #{@name}`."
|
@unsatisfied_because += "No `#{@name}` found in your PATH! Consider to `brew install #{@name}`."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user