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.84.tar.gz" sha256 "490c8f18c5a36e49d0f659464163e3fec8adb096362a01702f46f76606b923af" head "https://github.com/aws/aws-cli.git", :branch => "develop" bottle do cellar :any_skip_relocation sha256 "57e32871026d1ec15a3f3fce32ac1e1752e0ef92610579f21ac41d226387b851" => :sierra sha256 "9247d0fa16d3b5d4a64936759f23ff1ac8bd2288b81d60167ed3ee38a9b2cd44" => :el_capitan sha256 "69f07d20c037f9fd68dd534057f4e6952ba578b4eb00faff21882e6487743e40" => :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