2016-06-16 11:10:40 +00:00
|
|
|
# Make sure that you also bump botocore
|
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/"
|
2016-07-29 09:22:14 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/fd/81/d417eb199627ad9d3db8ebf966835677d92a9a8308b588a6d2b17f6583f8/awscli-1.10.51.tar.gz"
|
|
|
|
sha256 "98690bcc6d6ecc10212ab7b838a45940b25c01e240409c3d03f172cb9dc9c7a6"
|
2014-03-07 21:58:04 +00:00
|
|
|
|
2016-03-18 16:01:54 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2016-07-29 09:26:56 +00:00
|
|
|
sha256 "242543ca4b990b079563c4f12f8640de0533ce3275668974f2865b1db218d04e" => :el_capitan
|
|
|
|
sha256 "d35ed97cc5d223559a1f6e58bda66292ca4a532971b3b45946114366dc715e68" => :yosemite
|
|
|
|
sha256 "5aab68a06da1f37f67072fbdbfe1414ad61f59fdb76679fdceeb0aeb09e4e449" => :mavericks
|
2016-03-18 16:01:54 +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
|
|
|
|
|
2015-11-11 11:40:54 +00:00
|
|
|
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
|
2016-02-21 22:02:00 +00:00
|
|
|
|
|
|
|
resource "s3transfer" do
|
|
|
|
url "https://github.com/boto/s3transfer.git", :branch => "develop"
|
|
|
|
end
|
2014-03-07 21:58:04 +00:00
|
|
|
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
|
|
|
|
2016-06-22 09:45:59 +00:00
|
|
|
resource "botocore" do
|
2016-07-29 09:22:14 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/85/d4/1700f65e544c9be35171dba3dd96f8a3ea115a633506cabfeccf7e3bf17b/botocore-1.4.41.tar.gz"
|
|
|
|
sha256 "da37c2b9c942ff280e47122e48e1e9af827c81191da919e9c434c69e455e6a30"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
2014-03-07 21:58:04 +00:00
|
|
|
resource "colorama" do
|
2016-07-13 22:32:58 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/f0/d0/21c6449df0ca9da74859edc40208b3a57df9aca7323118c913e58d442030/colorama-0.3.7.tar.gz"
|
|
|
|
sha256 "e043c8d32527607223652021ff648fbb394d5e19cba9f1a698670b338c9d782b"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
2016-06-22 09:45:59 +00:00
|
|
|
resource "docutils" do
|
|
|
|
url "https://files.pythonhosted.org/packages/37/38/ceda70135b9144d84884ae2fc5886c6baac4edea39550f28bcd144c1234d/docutils-0.12.tar.gz"
|
|
|
|
sha256 "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa"
|
2016-02-21 22:02:00 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "futures" do
|
2016-06-15 00:25:14 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/55/db/97c1ca37edab586a1ae03d6892b6633d8eaa23b23ac40c7e5bbc55423c78/futures-3.0.5.tar.gz"
|
2016-02-21 22:02:00 +00:00
|
|
|
sha256 "0542525145d5afc984c88f914a0c85c77527f65946617edb5274f72406f981df"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
2016-06-22 09:45:59 +00:00
|
|
|
resource "jmespath" do
|
|
|
|
url "https://files.pythonhosted.org/packages/8f/d8/6e3e602a3e90c5e3961d3d159540df6b2ff32f5ab2ee8ee1d28235a425c1/jmespath-0.9.0.tar.gz"
|
|
|
|
sha256 "08dfaa06d4397f283a01e57089f3360e3b52b5b9da91a70e1fd91e9f0cdd3d3d"
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
|
2014-11-15 23:03:52 +00:00
|
|
|
resource "pyasn1" do
|
2016-06-15 00:25:14 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/f7/83/377e3dd2e95f9020dbd0dfd3c47aaa7deebe3c68d3857a4e51917146ae8b/pyasn1-0.1.9.tar.gz"
|
2016-01-07 08:25:53 +00:00
|
|
|
sha256 "853cacd96d1f701ddd67aa03ecc05f51890135b7262e922710112f12a2ed2a7f"
|
2014-11-15 23:03:52 +00:00
|
|
|
end
|
|
|
|
|
2016-06-22 09:45:59 +00:00
|
|
|
resource "python-dateutil" do
|
|
|
|
url "https://files.pythonhosted.org/packages/3e/f5/aad82824b369332a676a90a8c0d1e608b17e740bbb6aeeebca726f17b902/python-dateutil-2.5.3.tar.gz"
|
|
|
|
sha256 "1408fdb07c6a1fa9997567ce3fcee6a337b39a503d80699e0f213de4aa4b32ed"
|
|
|
|
end
|
|
|
|
|
2014-03-07 21:58:04 +00:00
|
|
|
resource "rsa" do
|
2016-06-15 00:25:14 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/14/89/adf8b72371e37f3ca69c6cb8ab6319d009c4a24b04a31399e5bd77d9bb57/rsa-3.4.2.tar.gz"
|
2016-05-26 15:11:17 +00:00
|
|
|
sha256 "25df4e10c263fb88b5ace923dd84bf9aa7f5019687b5e55382ffcdb8bede9db5"
|
2016-02-21 22:02:00 +00:00
|
|
|
end
|
|
|
|
|
2016-06-22 09:45:59 +00:00
|
|
|
resource "s3transfer" do
|
|
|
|
url "https://files.pythonhosted.org/packages/6e/12/5d0ea478e6d261857a461af921b78f3bc6f92c479ffe57076f4fc9a362ab/s3transfer-0.0.1.tar.gz"
|
|
|
|
sha256 "2bb9ed8db58af94dfa78f75f554d646dfe4b4741fc87f63a20c2bfb3f70f4355"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "six" do
|
|
|
|
url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz"
|
|
|
|
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
|
|
|
|
end
|
|
|
|
|
2014-03-07 21:58:04 +00:00
|
|
|
def install
|
2014-11-15 23:03:52 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
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
|
|
|
|
|
2016-06-15 00:25:14 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
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
|
2015-08-10 17:41:27 +00:00
|
|
|
pkgshare.install "awscli/examples"
|
2014-03-07 21:58:04 +00:00
|
|
|
|
2014-11-15 23:03:52 +00:00
|
|
|
bin.install Dir[libexec/"bin/*"]
|
2016-06-15 00:25:14 +00:00
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2014-03-07 21:58:04 +00:00
|
|
|
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:
|
2015-09-20 14:16:04 +00:00
|
|
|
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
|
2014-03-07 21:58:04 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2016-06-15 00:25:14 +00:00
|
|
|
assert_match version.to_s, shell_output("#{bin}/aws --version 2>&1")
|
2014-03-07 21:58:04 +00:00
|
|
|
end
|
|
|
|
end
|