homebrew-core/Formula/awscli.rb
2017-05-23 01:07:04 -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.90.tar.gz"
sha256 "c62911f515fb99d5ab2263a0f0af19397430609af9363df073406d9fdeb79a88"
head "https://github.com/aws/aws-cli.git", :branch => "develop"
bottle do
cellar :any_skip_relocation
sha256 "991c34f929aa707a19c396fadb5ec2be8cf36564f3502b52f89513b30037bf5f" => :sierra
sha256 "b89e80201eb2eca60b623d527ce5df9eea9fc8b3ea6aa06af10afca6bac0cdb1" => :el_capitan
sha256 "b1ff0730530adeecc8a5f09eb5e0f206d9caa7911ea3fe7b42638f58732c857d" => :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