python_requirement: add libexec/bin to PATH.

This avoids having to fix formulae that use `python` to make them use
`python2`.
This commit is contained in:
Mike McQuaid 2017-07-14 16:58:14 +01:00
parent 4ca2efb12d
commit f08b518481

View File

@ -21,6 +21,7 @@ class PythonRequirement < Requirement
# 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
ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/site-packages"