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/0.9.1.4.tar.gz"
|
|
|
|
sha1 "fa736ce94b204966f101251b8f8287147a9de3ec"
|
|
|
|
|
2014-10-20 13:38:56 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "b1cb67c8e2f312069f524076853bdaa573a5a06b" => :yosemite
|
|
|
|
sha1 "346eb88f4ed97ef6bfc005d7bdae37fbef1ad29d" => :mavericks
|
|
|
|
sha1 "63772b299987d56ecf696024040dc02dc277b522" => :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.1.tar.gz"
|
|
|
|
sha1 "9514ea08b84ffab8d28046dd3b5dcd359d239b13"
|
|
|
|
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.9.1.1pre.tar.gz"
|
|
|
|
sha1 "828c8ffe052d3a9af290dc6e934ecf5f5d4efa21"
|
|
|
|
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
|