homebrew-core/Formula/fig.rb
2014-07-18 18:03:05 -05:00

69 lines
2.2 KiB
Ruby

require "formula"
class Fig < Formula
homepage "http://orchardup.github.io/fig/"
url "https://github.com/orchardup/fig/archive/0.5.1.tar.gz"
sha1 "38b03a7d823ab3b2662c9c6ada503e28c35e122c"
bottle do
cellar :any
sha1 "e3d799b85f3a170023d436c13234db7b9ec7f2c6" => :mavericks
sha1 "48432463fdf85a409e5123ff2a1571b2193af289" => :mountain_lion
sha1 "20e2688476a578f1d05a07504d4c50828e412c12" => :lion
end
depends_on :python if MacOS.version <= :snow_leopard
depends_on "libyaml"
resource "docopt" do
url "https://pypi.python.org/packages/source/d/docopt/docopt-0.6.1.tar.gz"
sha1 "3d0ad1cf495d2c801327042e02d67b4ee4b85cd4"
end
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.2.1.tar.gz"
sha1 "88eb1fd6a0dfb8b97262f8029978d7c75eebc16f"
end
resource "texttable" do
url "https://pypi.python.org/packages/source/t/texttable/texttable-0.8.1.tar.gz"
sha1 "ca505fb7424defa99f5a85bdaf433a6b24ffa82c"
end
resource "websocket-client" do
url "https://pypi.python.org/packages/source/w/websocket-client/websocket-client-0.11.0.tar.gz"
sha1 "a38cb6072a25b18faf11d31dd415750692c36f33"
end
resource "dockerpty" do
url "https://pypi.python.org/packages/source/d/dockerpty/dockerpty-0.2.1.tar.gz"
sha1 "6edf60955c274ee258ba4fe1ea7233c252fd179b"
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"
install_args = ["setup.py", "install", "--prefix=#{libexec}"]
resources.each do |r|
r.stage { system "python", *install_args }
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}/fig", "--version"
end
end