diff options
| author | Alex Dunn | 2015-08-31 13:17:50 -0700 |
|---|---|---|
| committer | Alex Dunn | 2015-09-01 13:00:01 -0700 |
| commit | 370df177c46e9f13415b2da99b868fe56546764c (patch) | |
| tree | 3822f7378180ca4a63a51b040121cbc875f6ed77 | |
| parent | 01d7f4e766e47aacb354d60bdce307ee0f768987 (diff) | |
| download | brew-370df177c46e9f13415b2da99b868fe56546764c.tar.bz2 | |
python_requirement: fix ENV for python3
Closes Homebrew/homebrew#43453.
| -rw-r--r-- | Library/Homebrew/requirements/python_requirement.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/requirements/python_requirement.rb b/Library/Homebrew/requirements/python_requirement.rb index f41722782..d4e4a116d 100644 --- a/Library/Homebrew/requirements/python_requirement.rb +++ b/Library/Homebrew/requirements/python_requirement.rb @@ -24,9 +24,7 @@ class PythonRequirement < Requirement ENV.prepend_path "PATH", Formula["python"].opt_bin end - if python_binary == "python" - ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/site-packages" - end + ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/site-packages" end def python_short_version @@ -62,6 +60,10 @@ class Python3Requirement < PythonRequirement satisfy(:build_env => false) { which_python } + env do + ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{python_short_version}/site-packages" + end + def python_binary "python3" end |
