homebrew-core/Formula/awscli.rb
2017-03-09 07:54:58 +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.59.tar.gz"
sha256 "c5e4c8ec3f3eec83fdcf2774c4cf1fb166a9585c0110e2c33a0abc889d4c7299"
head "https://github.com/aws/aws-cli.git", :branch => "develop"
bottle do
cellar :any_skip_relocation
sha256 "7002c3bf5dbcf664ca98db92bffe881a2b266d2fd09f15a311c0e2292c3baf93" => :sierra
sha256 "fb4c96156b6b469ce74c517205f7d7b97b28fca4c2c1fd3d9162014f93f3c5be" => :el_capitan
sha256 "7a91010971bf69d20b6cb469920016e2a93209eab9410c0e9c62cde12e28411b" => :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