42 lines
1.5 KiB
Ruby
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.70.tar.gz"
|
|
sha256 "3ab21edc65c1471a0c408c379909ab20b0d23ba2594e67c67f89a91c66c94095"
|
|
head "https://github.com/aws/aws-cli.git", :branch => "develop"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "4c5742aeb62d22244e9f0c88361f2937eed360fa98deb039d16f72b13c6d2bc6" => :sierra
|
|
sha256 "65ff45d16d1f2ef7ce9bbc9ade6fe19e98efaa2f75f491cb7c03a869ee5f3b25" => :el_capitan
|
|
sha256 "9b0724367d05550e3f6700134692d71986c3b258ed4423c1f8a1c89dcff933fb" => :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
|