homebrew-core/Formula/awscli.rb
Alexander Hamann dc8ad76060 awscli 1.11.63
Closes #11060.

Signed-off-by: Alexander Hamann <neutric@users.noreply.github.com>
2017-03-14 03:14:25 +01:00

42 lines
1.5 KiB
Ruby

class Awscli < Formula
include Language::Python::Virtualenv
desc "Official Amazon AWS command-line interface"
homepage "https://aws.amazon.com/cli/"
url "https://github.com/aws/aws-cli/archive/1.11.63.tar.gz"
sha256 "6d9eda29985b687164883a5fdf3ebd7046fbceaa317c531fc7c0037d4998dfda"
head "https://github.com/aws/aws-cli.git", :branch => "develop"
bottle do
cellar :any_skip_relocation
sha256 "e027869af358d89bca7a6b1860dffbead72a8468281a41ad432b305db7afe693" => :sierra
sha256 "ef7570bb554735c261aaa51ee02382a96e7b8d3c2f77b8e866741d87a2ac35bb" => :el_capitan
sha256 "fcd4be1567e1a3bf4fd6d8308dd81c5659f6fcd59c2dc492f3c0c2506d2bf3b9" => :yosemite
end
# Use :python on Lion to avoid urllib3 warning
# https://github.com/Homebrew/homebrew/pull/37240
depends_on :python if MacOS.version <= :lion
def install
venv = virtualenv_create(libexec)
system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:",
"--ignore-installed", buildpath
system libexec/"bin/pip", "uninstall", "-y", "awscli"
venv.pip_install_and_link buildpath
pkgshare.install "awscli/examples"
bash_completion.install "bin/aws_bash_completer"
zsh_completion.install "bin/aws_zsh_completer.sh" => "_aws"
end
def caveats; <<-EOS.undent
The "examples" directory has been installed to:
#{HOMEBREW_PREFIX}/share/awscli/examples
EOS
end
test do
assert_match "topics", shell_output("#{bin}/aws help")
end
end