diff options
| author | ilovezfs | 2018-02-28 05:43:47 -0800 |
|---|---|---|
| committer | GitHub | 2018-02-28 05:43:47 -0800 |
| commit | 8a23df7f76978df8df1efb65872e54ecfc6b831b (patch) | |
| tree | 224f866d9018f308ead6705c51221ad5f18b072a /Library/Homebrew | |
| parent | e3be551244d53137752734a1ce2742810676f130 (diff) | |
| parent | 04cec369c7f75d53136cf4eb46efb5fd184527b4 (diff) | |
| download | brew-8a23df7f76978df8df1efb65872e54ecfc6b831b.tar.bz2 | |
Merge pull request #3848 from ilovezfs/python-teach-each-python-to-speak-@
language/python: handle python@* in each_python
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/language/python.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb index 3908f4b8f..648abb5b1 100644 --- a/Library/Homebrew/language/python.rb +++ b/Library/Homebrew/language/python.rb @@ -15,10 +15,11 @@ module Language def self.each_python(build, &block) original_pythonpath = ENV["PYTHONPATH"] - ["python", "python3"].each do |python| - next if build.without? python + { "python@3" => "python3", "python@2" => "python2.7" }.each do |python_formula, python| + python_formula = Formulary.factory(python_formula) + next if build.without? python_formula.to_s version = major_minor_version python - ENV["PYTHONPATH"] = if Formulary.factory(python).installed? + ENV["PYTHONPATH"] = if python_formula.installed? nil else homebrew_site_packages(version) |
