aws-shell: depend on python instead of python@2

Also, update python resources.

Closes #26868.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
INADA Naoki 2018-04-20 21:02:04 +09:00 committed by ilovezfs
parent 8e31ca8d78
commit 5b854ab6b2

View file

@ -3,7 +3,7 @@ class AwsShell < Formula
homepage "https://github.com/awslabs/aws-shell"
url "https://files.pythonhosted.org/packages/ea/a0/0fba732444bdc23580f5e0290b8a6732b47a934c1978d108407704b01eec/aws-shell-0.2.0.tar.gz"
sha256 "b46a673b81254e5e014297e08c9ecab535773aa651ca33dc3786a1fd612f9810"
revision 1
revision 2
bottle do
cellar :any_skip_relocation
@ -12,23 +12,21 @@ class AwsShell < Formula
sha256 "adfcbbdfe945223c373cd4c9eb8f2ef45d35cbcd9c860ce81d49647f8311a65d" => :el_capitan
end
# Use python on Lion to avoid urllib3 warning
# https://github.com/Homebrew/homebrew/pull/37240
depends_on "python@2"
depends_on "python"
resource "awscli" do
url "https://files.pythonhosted.org/packages/34/c6/02f25ab114e5812146e9ef4ed21c2cf5aaea05c55237d4ab255b91de5a39/awscli-1.11.144.tar.gz"
sha256 "3109ecb35e92d1191917419dbd6060808e0971fdda1fd943cf74556bf88d7017"
url "https://files.pythonhosted.org/packages/f9/17/d9d33112aff940a8d8d90cb685718d0eb6e3c2e1a35e46bbb8de95f5d118/awscli-1.15.5.tar.gz"
sha256 "738ba6b6aea380886be27b8571d773bfd4a03336a9059b5b181d7606b246d339"
end
resource "boto3" do
url "https://files.pythonhosted.org/packages/b6/7c/b9caa157b514e0a456286172862428a83814e4eda114ea1e80267de85378/boto3-1.4.7.tar.gz"
sha256 "f79f77dca2280f7780f39d72a5088f4cf2b626c0921e7185ed6ac17abfdd7e6c"
url "https://files.pythonhosted.org/packages/7c/42/224d9851e4c9d33594851d0f0a11f9096afb92f0d4d6ae7e712740e91114/boto3-1.7.5.tar.gz"
sha256 "355cb1c0b7e279854d0f103ad077151ebf97b7b0a13cf1053706d60326b61892"
end
resource "botocore" do
url "https://files.pythonhosted.org/packages/f5/3d/5bd79b78c74e45859d89066e0c5efa777eddc78f939b99759336de17ff9f/botocore-1.7.2.tar.gz"
sha256 "375cb4a995828851452d5a0266cd121b3bf6bd0181df47c2a5b66c39f91cade7"
url "https://files.pythonhosted.org/packages/67/d9/e313271d650b496b752139f3e2392103670fab27a127b0ba1a453a0a2475/botocore-1.10.5.tar.gz"
sha256 "190aeedb9badf4e5a867652eab86adbb4de0c75413fa9487f9cf237cf7c5a2d0"
end
resource "colorama" do
@ -46,11 +44,6 @@ class AwsShell < Formula
sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274"
end
resource "futures" do
url "https://files.pythonhosted.org/packages/cc/26/b61e3a4eb50653e8a7339d84eeaa46d1e93b92951978873c220ae64d0733/futures-3.1.1.tar.gz"
sha256 "51ecb45f0add83c806c68e4b06106f90db260585b25ef2abfcda0bd95c0132fd"
end
resource "jmespath" do
url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz"
sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64"
@ -62,8 +55,8 @@ class AwsShell < Formula
end
resource "pyasn1" do
url "https://files.pythonhosted.org/packages/33/4b/b3838af9a0bd1d17463031cf28cb1c196618900ccf80b62979f48c42768b/pyasn1-0.3.3.tar.gz"
sha256 "01c20ade412088b42dcd5f0fef6149f6b7377297c5c5f222bb5ef0331ee3517c"
url "https://files.pythonhosted.org/packages/eb/3d/b7d0fdf4a882e26674c68c20f40682491377c4db1439870f5b6f862f76ed/pyasn1-0.4.2.tar.gz"
sha256 "d258b0a71994f7770599835249cece1caef3c70def868c4915e6e5ca49b67d15"
end
resource "Pygments" do
@ -87,13 +80,13 @@ class AwsShell < Formula
end
resource "s3transfer" do
url "https://files.pythonhosted.org/packages/a8/58/d264e95e1b19a811fc52ff41c95dafd9c70cc7457b658bc04d87dfad31de/s3transfer-0.1.11.tar.gz"
sha256 "76f1f58f4a47e2c8afa135e2c76958806a3abbc42b721d87fd9d11409c75d979"
url "https://files.pythonhosted.org/packages/9a/66/c6a5ae4dbbaf253bd662921b805e4972451a6d214d0dc9fb3300cb642320/s3transfer-0.1.13.tar.gz"
sha256 "90dc18e028989c609146e241ea153250be451e05ecc0c2832565231dacdf59c1"
end
resource "six" do
url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz"
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz"
sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
end
resource "wcwidth" do
@ -102,16 +95,17 @@ class AwsShell < Formula
end
def install
ENV["PYTHONPATH"] = libexec/"lib/python2.7/site-packages"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
xy = Language::Python.major_minor_version "python3"
ENV["PYTHONPATH"] = libexec/"lib/python#{xy}/site-packages"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
resources.each do |r|
r.stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
system "python3", *Language::Python.setup_install_args(libexec/"vendor")
end
end
system "python", *Language::Python.setup_install_args(libexec)
system "python3", *Language::Python.setup_install_args(libexec)
bin.install Dir[libexec/"bin/*"]
env = {
:PATH => "#{libexec}/vendor/bin:$PATH",