Skip to content

Commit

Permalink
virtualenv_install_with_resources: invoke python with versioned name.
Browse files Browse the repository at this point in the history
The unversioned python executable no longer refers to python3.
  • Loading branch information
ilovezfs committed Mar 9, 2018
1 parent 8d22cb7 commit 776fec7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Library/Homebrew/language/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ def needs_python?(python)
def virtualenv_install_with_resources(options = {})
python = options[:using]
if python.nil?
wanted = %w[python python@2 python2 python3].select { |py| needs_python?(py) }
wanted = %w[python python@2 python2 python3 python@3].select { |py| needs_python?(py) }
raise FormulaAmbiguousPythonError, self if wanted.size > 1
python = wanted.first || "python"
python = wanted.first || "python2.7"
python = "python3" if python == "python"
end
venv = virtualenv_create(libexec, python.delete("@"))
venv.pip_install resources
Expand Down

0 comments on commit 776fec7

Please sign in to comment.