From 6596db2bd982b4d40c798f3c93daa4e2a963af44 Mon Sep 17 00:00:00 2001 From: Samuel John Date: Fri, 23 Aug 2013 20:26:39 +0200 Subject: [PATCH] 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. --- Library/Homebrew/requirements/python_dependency.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb index fee1b5bd34dd..5d7e0aed637a 100644 --- a/Library/Homebrew/requirements/python_dependency.rb +++ b/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}`."