Merge pull request #2917 from ilovezfs/python-libexec-bin

python_requirement: prefer Homebrew's Python
This commit is contained in:
ilovezfs 2017-07-20 04:26:20 -07:00 committed by GitHub
commit 997260da54

View File

@ -18,12 +18,12 @@ class PythonRequirement < Requirement
if !system_python? && short_version == Version.create("2.7")
ENV.prepend_path "PATH", which_python.dirname
# Homebrew Python should take precedence over older Pythons in the PATH
elsif short_version != Version.create("2.7")
ENV.prepend_path "PATH", Formula["python"].opt_bin
ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin"
end
# Homebrew Python should take precedence over other Pythons in the PATH
ENV.prepend_path "PATH", Formula["python"].opt_bin
ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin"
ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/site-packages"
end