2014-03-07 21:58:04 +00:00
|
|
|
class Awscli < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Official Amazon AWS command-line interface"
|
2014-03-07 21:58:04 +00:00
|
|
|
homepage "https://aws.amazon.com/cli/"
|
2015-06-25 08:58:09 +00:00
|
|
|
url "https://pypi.python.org/packages/source/a/awscli/awscli-1.7.36.tar.gz"
|
|
|
|
sha256 "81d5f021d8d5c3df22e9d66521fb248454c31ad4bb4bdfc18e559a3997fabfac"
|
2014-03-07 21:58:04 +00:00
|
|
|
|
2014-07-17 07:26:17 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-06-25 09:25:18 +00:00
|
|
|
sha256 "c45507aeee27e0b93a89c91be84720bcc2c49d22e8702dadee0377086ebdb43e" => :yosemite
|
|
|
|
sha256 "47a486397dffbd4e3a8d16f02b112d7872c83b393c44c44c4ca0eab5df575b3f" => :mavericks
|
|
|
|
sha256 "f57939208186d2d265dedc609a5b7841c59555d89622a3f3c797375837ac1421" => :mountain_lion
|
2014-07-17 07:26:17 +00:00
|
|
|
end
|
|
|
|
|
2014-03-07 21:58:04 +00:00
|
|
|
head do
|
2014-10-13 00:34:24 +00:00
|
|
|
url "https://github.com/aws/aws-cli.git", :branch => "develop"
|
2014-03-07 21:58:04 +00:00
|
|
|
|
|
|
|
resource "botocore" do
|
2014-10-13 00:34:24 +00:00
|
|
|
url "https://github.com/boto/botocore.git", :branch => "develop"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "bcdoc" do
|
2014-10-13 00:34:24 +00:00
|
|
|
url "https://github.com/boto/bcdoc.git", :branch => "develop"
|
|
|
|
url "https://github.com/boto/jmespath.git", :branch => "develop"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-03-31 07:25:07 +00:00
|
|
|
# Use :python on Lion to avoid urllib3 warning
|
|
|
|
# https://github.com/Homebrew/homebrew/pull/37240
|
|
|
|
depends_on :python if MacOS.version <= :lion
|
2014-03-07 21:58:04 +00:00
|
|
|
|
|
|
|
resource "six" do
|
2015-01-12 19:58:29 +00:00
|
|
|
url "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz"
|
2015-06-19 16:15:49 +00:00
|
|
|
sha256 "e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
2014-11-15 23:03:52 +00:00
|
|
|
resource "python-dateutil" do
|
2015-05-25 12:34:06 +00:00
|
|
|
url "https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.4.2.tar.gz"
|
|
|
|
sha256 "3e95445c1db500a344079a47b171c45ef18f57d188dffdb0e4165c71bea8eb3d"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
2014-03-07 21:58:04 +00:00
|
|
|
resource "colorama" do
|
2015-03-31 07:25:07 +00:00
|
|
|
url "https://pypi.python.org/packages/source/c/colorama/colorama-0.3.3.tar.gz"
|
|
|
|
sha256 "eb21f2ba718fbf357afdfdf6f641ab393901c7ca8d9f37edd0bee4806ffa269c"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "jmespath" do
|
2015-04-30 22:28:51 +00:00
|
|
|
url "https://pypi.python.org/packages/source/j/jmespath/jmespath-0.7.1.tar.gz"
|
2015-06-19 16:15:49 +00:00
|
|
|
sha256 "cd5a12ee3dfa470283a020a35e69e83b0700d44fe413014fd35ad5584c5f5fd1"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "botocore" do
|
2015-06-25 08:58:09 +00:00
|
|
|
url "https://pypi.python.org/packages/source/b/botocore/botocore-1.0.1.tar.gz"
|
|
|
|
sha256 "87773ebc7b70206506836f79bab8300e963e522d25c60f2d5992643745556a8b"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "docutils" do
|
2014-07-21 22:48:16 +00:00
|
|
|
url "https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz"
|
2015-06-19 16:15:49 +00:00
|
|
|
sha256 "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
2014-11-15 23:03:52 +00:00
|
|
|
resource "bcdoc" do
|
2015-06-12 08:06:14 +00:00
|
|
|
url "https://pypi.python.org/packages/source/b/bcdoc/bcdoc-0.16.0.tar.gz"
|
|
|
|
sha256 "f568c182e06883becf7196f227052435cffd45604700c82362ca77d3427b6202"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "pyasn1" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pyasn1/pyasn1-0.1.7.tar.gz"
|
2015-06-19 16:15:49 +00:00
|
|
|
sha256 "e4f81d53c533f6bd9526b047f047f7b101c24ab17339c1a7ad8f98b25c101eab"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
2014-03-07 21:58:04 +00:00
|
|
|
resource "rsa" do
|
2015-03-31 07:25:07 +00:00
|
|
|
url "https://pypi.python.org/packages/source/r/rsa/rsa-3.1.4.tar.gz"
|
|
|
|
sha256 "e2b0b05936c276b1edd2e1525553233b666df9e29b5c3ba223eed738277c82a0"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2014-11-15 23:03:52 +00:00
|
|
|
ENV["PYTHONPATH"] = libexec/"lib/python2.7/site-packages"
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
2014-03-07 21:58:04 +00:00
|
|
|
|
2014-07-19 03:42:47 +00:00
|
|
|
resources.each do |r|
|
2014-12-10 20:21:19 +00:00
|
|
|
r.stage do
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
2014-12-10 20:21:19 +00:00
|
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
2014-03-07 21:58:04 +00:00
|
|
|
|
|
|
|
# Install zsh completion
|
|
|
|
zsh_completion.install "bin/aws_zsh_completer.sh" => "_aws"
|
|
|
|
|
|
|
|
# Install the examples
|
|
|
|
(share+"awscli").install "awscli/examples"
|
|
|
|
|
2014-11-15 23:03:52 +00:00
|
|
|
bin.install Dir[libexec/"bin/*"]
|
2014-03-07 21:58:04 +00:00
|
|
|
bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
The "examples" directory has been installed to:
|
|
|
|
#{HOMEBREW_PREFIX}/share/awscli/examples
|
|
|
|
|
|
|
|
Add the following to ~/.bashrc to enable bash completion:
|
|
|
|
complete -C aws_completer aws
|
|
|
|
|
|
|
|
Add the following to ~/.zshrc to enable zsh completion:
|
|
|
|
source #{HOMEBREW_PREFIX}/share/zsh/site-functions/_aws
|
|
|
|
|
|
|
|
Before using awscli, you need to tell it about your AWS credentials.
|
|
|
|
The easiest way to do this is to run:
|
|
|
|
aws configure
|
|
|
|
|
|
|
|
More information:
|
|
|
|
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/aws", "--version"
|
|
|
|
end
|
|
|
|
end
|