2015-01-03 04:07:14 +00:00
|
|
|
class Fabric < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Library and command-line tool for SSH"
|
2015-01-03 04:07:14 +00:00
|
|
|
homepage "http://www.fabfile.org"
|
2015-08-30 19:48:26 +00:00
|
|
|
url "https://github.com/fabric/fabric/archive/1.10.2.tar.gz"
|
|
|
|
sha256 "f142aca5a20624036a35faa387dd5c409ad534a130f39172115fd57d7e9c3a8d"
|
2015-01-03 04:07:14 +00:00
|
|
|
|
|
|
|
head "https://github.com/fabric/fabric.git"
|
|
|
|
|
2015-01-03 19:55:17 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-08-31 02:24:17 +00:00
|
|
|
sha256 "ddaccc0db8c861b4f1d5d0fec3d845ff440f86af3a28751a299ad7784253ba1d" => :yosemite
|
|
|
|
sha256 "044c9dec4d5021abd8b4c356e8ff0bfc5968115267b030219f010ff5b97abfbf" => :mavericks
|
|
|
|
sha256 "768df88335578704b1029b859ab7d36654cb5b20bfd1b0bc64e487476b7c214e" => :mountain_lion
|
2015-01-03 19:55:17 +00:00
|
|
|
end
|
|
|
|
|
2015-01-03 04:07:14 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
|
|
|
|
resource "paramiko" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/paramiko/paramiko-1.15.2.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "4f56a671a3eecbb76e6143e6e4ca007d503a39aa79aa9e14ade667fa53fd6e55"
|
2015-01-03 04:07:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "pycrypto" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c"
|
2015-01-03 04:07:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "ecdsa" do
|
2015-08-30 19:48:26 +00:00
|
|
|
url "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-0.13.tar.gz"
|
|
|
|
sha256 "64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa"
|
2015-01-03 04:07:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2015-01-11 16:16:36 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
2015-01-04 09:24:52 +00:00
|
|
|
resources.each do |r|
|
2015-01-11 16:16:36 +00:00
|
|
|
r.stage do
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
2015-01-03 04:07:14 +00:00
|
|
|
end
|
|
|
|
|
2015-01-11 16:16:36 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
2015-01-03 04:07:14 +00:00
|
|
|
|
2015-01-11 16:16:36 +00:00
|
|
|
bin.install Dir[libexec/"bin/*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2015-01-03 04:07:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"fabfile.py").write <<-EOS.undent
|
|
|
|
def hello():
|
|
|
|
print("Hello world!")
|
|
|
|
EOS
|
|
|
|
assert_equal "Hello world!\n\nDone.\n", `#{bin}/fab hello`
|
|
|
|
end
|
|
|
|
end
|