homebrew-core/Formula/tutum.rb

79 lines
2.4 KiB
Ruby
Raw Normal View History

2014-10-20 11:34:14 +00:00
require "formula"
class Tutum < Formula
homepage "https://www.tutum.co/"
url "https://github.com/tutumcloud/tutum-cli/archive/v0.11.0.1.tar.gz"
sha1 "501b0ec1582b741b2eca81bb5a27b11499b42f0c"
bottle do
cellar :any
2014-12-15 14:11:14 +00:00
sha1 "f6693bd01d54467a0674ff2f8280b4cda04e50d8" => :yosemite
sha1 "5c7c3b1902d3d5e8b16394b95e38281634a1e25e" => :mavericks
sha1 "cc9c71ee46b8b693a3fcf71749978ff41802aaa6" => :mountain_lion
end
2014-10-20 11:34:14 +00:00
depends_on :python if MacOS.version <= :snow_leopard
depends_on "libyaml"
resource "pyyaml" do
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.10.tar.gz"
sha1 "476dcfbcc6f4ebf3c06186229e8e2bd7d7b20e73"
end
resource "requests" do
url "https://pypi.python.org/packages/source/r/requests/requests-2.4.3.tar.gz"
sha1 "411f1bfa44556f7dd0f34cd822047c31baa7d741"
end
resource "ago" do
url "https://pypi.python.org/packages/source/a/ago/ago-0.0.6.tar.gz"
sha1 "b48b99151370de0c1642748a3f3b206649645d8d"
end
resource "docker-py" do
url "https://pypi.python.org/packages/source/d/docker-py/docker-py-0.5.3.tar.gz"
sha1 "11708a7021e3d0d522e145c057256d7d2acaec07"
2014-10-20 11:34:14 +00:00
end
resource "python-dateutil" do
url "https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.2.tar.gz"
sha1 "fbafcd19ea0082b3ecb17695b4cb46070181699f"
end
resource "python-tutum" do
url "https://pypi.python.org/packages/source/p/python-tutum/python-tutum-0.11.0.tar.gz"
sha1 "a8b011697fe015c468eeeed33ce242631e11d39a"
2014-10-20 11:34:14 +00:00
end
resource "six" do
url "https://pypi.python.org/packages/source/s/six/six-1.8.0.tar.gz"
sha1 "aa3b0659cbc85c6c7a91efc51f2d1007040070cd"
end
resource "tabulate" do
url "https://pypi.python.org/packages/source/t/tabulate/tabulate-0.7.2.tar.gz"
sha1 "da057c6d4faab9847436c3221c98f34911e623df"
end
def install
ENV["PYTHONPATH"] = lib+"python2.7/site-packages"
ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages"
ENV.prepend_create_path "PYTHONPATH", prefix+"lib/python2.7/site-packages"
resources.each do |r|
r.stage { system "python", "setup.py", "install", "--prefix=#{libexec}" }
end
system "python", "setup.py", "install", "--prefix=#{prefix}"
rm "#{lib}/python2.7/site-packages/site.py"
rm "#{lib}/python2.7/site-packages/easy-install.pth"
bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
system "#{bin}/tutum", "container"
end
end