Merge pull request #3618 from ilovezfs/python-teach-virtualenv-to-speak-@

language/python: handle python@* in virtualenv_install_with_resources
This commit is contained in:
Mike McQuaid 2017-12-31 09:42:23 +00:00 committed by GitHub
commit 884a2f3667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,11 +134,11 @@ module Language
def virtualenv_install_with_resources(options = {})
python = options[:using]
if python.nil?
wanted = %w[python python3].select { |py| needs_python?(py) }
wanted = %w[python python@2 python@3 python3].select { |py| needs_python?(py) }
raise FormulaAmbiguousPythonError, self if wanted.size > 1
python = wanted.first || "python"
python = wanted.first || "python2.7"
end
venv = virtualenv_create(libexec, python)
venv = virtualenv_create(libexec, python.delete("@"))
venv.pip_install resources
venv.pip_install_and_link buildpath
venv