aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilovezfs2017-07-20 04:26:20 -0700
committerGitHub2017-07-20 04:26:20 -0700
commit997260da541cf4d1be8769e8c7960372bd6a92f0 (patch)
treeff4630a397931b8b3b77ab421e59ecd5e4d1b6b2
parente715649354e122d5b3fac9440f9dc1282e6518af (diff)
parent4fb7626ce55edd2db910781298c770cd49c1302b (diff)
downloadbrew-997260da541cf4d1be8769e8c7960372bd6a92f0.tar.bz2
Merge pull request #2917 from ilovezfs/python-libexec-bin
python_requirement: prefer Homebrew's Python
-rw-r--r--Library/Homebrew/requirements/python_requirement.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/requirements/python_requirement.rb b/Library/Homebrew/requirements/python_requirement.rb
index a4d34c839..c162b072c 100644
--- a/Library/Homebrew/requirements/python_requirement.rb
+++ b/Library/Homebrew/requirements/python_requirement.rb
@@ -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