2014-03-07 21:58:04 +00:00
|
|
|
class Awscli < Formula
|
|
|
|
homepage "https://aws.amazon.com/cli/"
|
2015-02-16 12:47:30 +00:00
|
|
|
url "https://pypi.python.org/packages/source/a/awscli/awscli-1.7.8.tar.gz"
|
|
|
|
sha1 "294a7230402bb1dc11981bc4e6136bfaa04a602b"
|
2014-03-07 21:58:04 +00:00
|
|
|
|
2014-07-17 07:26:17 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-02-16 13:41:09 +00:00
|
|
|
sha1 "d85e8a692ae44d4c193b1615d4aa001e2455978b" => :yosemite
|
|
|
|
sha1 "ff411e5099d71f4bbb8220d7de8416584d80815c" => :mavericks
|
|
|
|
sha1 "76a335afe68821b74df710376ace5341b9d5e037" => :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"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "jmespath" do
|
2014-10-13 00:34:24 +00:00
|
|
|
url "https://github.com/boto/jmespath.git", :branch => "develop"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-04-30 22:35:52 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
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"
|
|
|
|
sha1 "d168e6d01f0900875c6ecebc97da72d0fda31129"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
2014-11-15 23:03:52 +00:00
|
|
|
resource "python-dateutil" do
|
2015-01-12 19:58:29 +00:00
|
|
|
url "https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.4.0.tar.gz"
|
|
|
|
sha1 "159081a4c5b3602ab440a7db305f987c00ee8c6d"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
2014-03-07 21:58:04 +00:00
|
|
|
resource "colorama" do
|
2015-01-12 19:58:29 +00:00
|
|
|
url "https://pypi.python.org/packages/source/c/colorama/colorama-0.2.5.tar.gz"
|
|
|
|
sha1 "87507210c5a7d400b27d23e8dd42734198663d66"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "jmespath" do
|
2015-02-16 12:47:30 +00:00
|
|
|
url "https://pypi.python.org/packages/source/j/jmespath/jmespath-0.6.1.tar.gz"
|
|
|
|
sha1 "f3fc294e5225f2529968f58eb75c9da91fbeb9c1"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "botocore" do
|
2015-02-16 12:47:30 +00:00
|
|
|
url "https://pypi.python.org/packages/source/b/botocore/botocore-0.89.0.tar.gz"
|
|
|
|
sha1 "15a4b154b49bc967d921253875cf41ff8f2b6816"
|
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"
|
|
|
|
sha1 "002450621b33c5690060345b0aac25bc2426d675"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
2014-11-15 23:03:52 +00:00
|
|
|
resource "bcdoc" do
|
|
|
|
url "https://pypi.python.org/packages/source/b/bcdoc/bcdoc-0.12.2.tar.gz"
|
|
|
|
sha1 "31b2a714c2803658d9d028c8edf4623fd0daaf18"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "pyasn1" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pyasn1/pyasn1-0.1.7.tar.gz"
|
|
|
|
sha1 "e32b91c5a5d9609fb1d07d8685a884bab22ca6d0"
|
|
|
|
end
|
|
|
|
|
2014-03-07 21:58:04 +00:00
|
|
|
resource "rsa" do
|
2015-01-12 19:58:29 +00:00
|
|
|
url "https://pypi.python.org/packages/source/r/rsa/rsa-3.1.2.tar.gz"
|
|
|
|
sha1 "ebf54ad3fff8bc1df09f5d777d5a913e5aef8df5"
|
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
|