aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-03-03 15:18:31 +0800
committerXu Cheng2015-03-03 17:29:53 +0800
commitbca9797cefff344fcd2631fd63d0b4ce4eb95fb0 (patch)
treece616a0ef4a674bdb483e2bb3ad3a21761cb3351 /Library
parent39c507a928ebb2a70bd93bf85449a6b4ece2925d (diff)
downloadhomebrew-bca9797cefff344fcd2631fd63d0b4ce4eb95fb0.tar.bz2
aws-elasticbeanstalk: drop AmazonWebServicesFormula and better way to handle python installation
Closes #37349. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/aws-elasticbeanstalk.rb43
1 files changed, 40 insertions, 3 deletions
diff --git a/Library/Formula/aws-elasticbeanstalk.rb b/Library/Formula/aws-elasticbeanstalk.rb
index 7bdb442a9..59dd6242d 100644
--- a/Library/Formula/aws-elasticbeanstalk.rb
+++ b/Library/Formula/aws-elasticbeanstalk.rb
@@ -1,20 +1,57 @@
-class AwsElasticbeanstalk < AmazonWebServicesFormula
- homepage "http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-eb.html"
+class AwsElasticbeanstalk < Formula
+ homepage "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-eb.html"
url "https://pypi.python.org/packages/source/a/awsebcli/awsebcli-3.1.2.tar.gz"
sha1 "d64147b381574880b2f65e676b6e1b74a378d9cf"
depends_on :python if MacOS.version <= :snow_leopard
+ resource "pyyaml" do
+ url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz"
+ sha1 "1a2d5df8b31124573efb9598ec6d54767f3c4cd4"
+ end
+
+ resource "cement" do
+ url "https://pypi.python.org/packages/source/c/cement/cement-2.4.0.tar.gz"
+ sha1 "25e4fc1f85cc37fc6286bf0aa6cbf0ff23928044"
+ end
+
+ resource "python-dateutil" do
+ url "https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.4.0.tar.gz"
+ sha1 "159081a4c5b3602ab440a7db305f987c00ee8c6d"
+ end
+
+ resource "jmespath" do
+ url "https://pypi.python.org/packages/source/j/jmespath/jmespath-0.6.1.tar.gz"
+ sha1 "f3fc294e5225f2529968f58eb75c9da91fbeb9c1"
+ end
+
+ resource "six" do
+ url "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz"
+ sha1 "d168e6d01f0900875c6ecebc97da72d0fda31129"
+ end
+
def install
ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages"
- system "python", "setup.py", "install", "--prefix=#{libexec}"
+ resources.each do |r|
+ r.stage { system "python", *Language::Python.setup_install_args(libexec) }
+ end
+
+ system "python", *Language::Python.setup_install_args(libexec)
bash_completion.install libexec/"bin/eb_completion.bash"
bin.install Dir[libexec/"bin/{eb,jp}"]
bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
+ def caveats; <<-EOS.undent
+ Before you can use these tools you must export some variables to your $SHELL.
+ export AWS_ACCESS_KEY="<Your AWS Access ID>"
+ export AWS_SECRET_KEY="<Your AWS Secret Key>"
+ export AWS_CREDENTIAL_FILE="<Path to the credentials file>"
+ EOS
+ end
+
test do
system "#{bin}/eb", "--version"
end