homebrew-core/Formula/awscli.rb
2017-04-19 01:07:01 -07: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.77.tar.gz"
sha256 "b52463296970751914935d9a67adf0b1df64ca51a057894bba394b67dfcff4c0"
head "https://github.com/aws/aws-cli.git", :branch => "develop"
bottle do
cellar :any_skip_relocation
sha256 "7a35277664af10850c5999391f33490a74f9f21b4d964c3902a81ece6cd782cd" => :sierra
sha256 "af21b8732b447c41f869c5c3d48f5c3b6397905baec5281dd7d455ca7cf8afe9" => :el_capitan
sha256 "05cbd154bafe88e3f1f6a2644ff800ace8503c119cd1ccc985417f7ec29e1184" => :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