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.93.tar.gz"
|
|
sha256 "7d6af721e54342b83f20e6d5957e299a161e9ccd4b4eaa9f601b1ee76acb2e4c"
|
|
head "https://github.com/aws/aws-cli.git", :branch => "develop"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "136c248ea3a95de5673a5ea381e562bf304cb8b6bfed41c98a45db74a0f9b3a2" => :sierra
|
|
sha256 "92903b0f6dec09bc61371eaf9346a51170e9a2a848aba4f3790b29552c2e7e9b" => :el_capitan
|
|
sha256 "074fa7735f0dd45591995a1480d12556aebd2a81e54773d58eda957377b8653f" => :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
|