2014-02-19 23:39:48 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class AppscaleTools < Formula
|
2014-06-28 03:21:04 +00:00
|
|
|
homepage "https://github.com/AppScale/appscale-tools"
|
|
|
|
url "https://github.com/AppScale/appscale-tools/archive/2.0.0.tar.gz"
|
|
|
|
sha1 "d6855bd6e91b56fd07d7bf59f81ea6cdd1a482b8"
|
2014-06-20 19:02:44 +00:00
|
|
|
head "https://github.com/AppScale/appscale-tools.git"
|
2014-02-19 23:39:48 +00:00
|
|
|
|
2014-04-30 22:35:22 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
2014-06-28 03:21:04 +00:00
|
|
|
depends_on "libyaml"
|
2014-02-19 23:39:48 +00:00
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
resource "termcolor" do
|
|
|
|
url "https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz"
|
|
|
|
sha1 "52045880a05c0fbd192343d9c9aad46a73d20e8c"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
resource "SOAPpy" do
|
|
|
|
url "https://pypi.python.org/packages/source/S/SOAPpy/SOAPpy-0.12.6.zip"
|
|
|
|
sha1 "72c384e9e43ce97c9cd0756567e745fcb5419430"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
resource "pyyaml" do
|
|
|
|
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz"
|
|
|
|
sha1 "1a2d5df8b31124573efb9598ec6d54767f3c4cd4"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
resource "boto" do
|
|
|
|
url "https://pypi.python.org/packages/source/b/boto/boto-2.9.9.tar.gz"
|
|
|
|
sha1 "8f8bf47a9660d6886a73c65cd00243219b5f04c4"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
resource "argparse" do
|
|
|
|
url "https://argparse.googlecode.com/files/argparse-1.2.1.tar.gz"
|
|
|
|
sha1 "caadac82aa2576d6b445058c1fcf6ef0b14dbaa1"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
resource "oauth2client" do
|
|
|
|
url "https://pypi.python.org/packages/source/o/oauth2client/oauth2client-1.2.tar.gz"
|
|
|
|
sha1 "d38bf2d5392e4e4eea66b039a408079f6fe008d0"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
resource "google-api-python-client" do
|
|
|
|
url "https://pypi.python.org/packages/source/g/google-api-python-client/google-api-python-client-1.2.tar.gz"
|
|
|
|
sha1 "31ddb6e125b0683d29493c9f486d48a4f63c913b"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
resource "httplib2" do
|
|
|
|
url "https://pypi.python.org/packages/source/h/httplib2/httplib2-0.9.tar.gz"
|
|
|
|
sha1 "1b9774a81136a222f02e711d81efb775dc87b70e"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
resource "python-gflags" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/python-gflags/python-gflags-2.0.tar.gz"
|
|
|
|
sha1 "1529a1102da2fc671f2a9a5e387ebabd1ceacbbf"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2014-06-28 03:21:04 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages"
|
2014-07-19 03:42:47 +00:00
|
|
|
|
|
|
|
resources.each do |r|
|
|
|
|
r.stage { system "python", "setup.py", "install", "--prefix=#{libexec}" }
|
|
|
|
end
|
2014-02-19 23:39:48 +00:00
|
|
|
|
2014-04-17 15:15:52 +00:00
|
|
|
inreplace Dir["bin/appscale*"] do |s|
|
|
|
|
s.gsub! /^lib = os.*/, "lib = '#{libexec}'"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
prefix.install "bin", "templates", "LICENSE", "README.md"
|
|
|
|
libexec.install Dir["lib/*"]
|
2014-02-19 23:39:48 +00:00
|
|
|
|
2014-06-28 03:21:04 +00:00
|
|
|
bin.env_script_all_files(libexec+"bin", :PYTHONPATH => "#{libexec}/lib/python2.7/site-packages")
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2014-06-28 03:21:04 +00:00
|
|
|
system bin/"appscale", "help"
|
2014-02-19 23:39:48 +00:00
|
|
|
end
|
|
|
|
end
|