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.63.tar.gz" sha256 "6d9eda29985b687164883a5fdf3ebd7046fbceaa317c531fc7c0037d4998dfda" head "https://github.com/aws/aws-cli.git", :branch => "develop" bottle do cellar :any_skip_relocation sha256 "bc1d34eb3e3602c397103edb5bbb666430d37a3ded561e94c06ca37c65e9e40b" => :sierra sha256 "d69d5e048cb2e318487245ba367698327bf56f46ee3dff9cb9fcb14f1c70aad9" => :el_capitan sha256 "43537d07753c9af0e9835a4d2c1967b71c5a235827e09d932350fee42c3e97d1" => :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