45 lines
1.8 KiB
Ruby
45 lines
1.8 KiB
Ruby
class Ccm < Formula
|
|
desc "Create and destroy an Apache Cassandra cluster on localhost"
|
|
homepage "https://github.com/pcmanus/ccm"
|
|
url "https://files.pythonhosted.org/packages/5c/23/104e851fd83c00c516b7f56d6c93bacb3ce3bcaf1ebd47570e17eb464572/ccm-3.1.2.tar.gz"
|
|
sha256 "62c51165f3ba3a823050f29f276dc5966cbc90860323bc8e88d16f8524932e28"
|
|
head "https://github.com/pcmanus/ccm.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "2824ce5a6e26fe80df03c2d762c740c96b9f221a4d4ef8368e587a84a4557705" => :high_sierra
|
|
sha256 "2824ce5a6e26fe80df03c2d762c740c96b9f221a4d4ef8368e587a84a4557705" => :sierra
|
|
sha256 "a4d7d4e0ffa255c81f59f4966b96bb2c1a45b81295f038138ee31b88cd2e20ff" => :el_capitan
|
|
end
|
|
|
|
depends_on "python" if MacOS.version <= :snow_leopard
|
|
|
|
resource "PyYAML" do
|
|
url "https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz"
|
|
sha256 "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab"
|
|
end
|
|
|
|
resource "six" do
|
|
url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz"
|
|
sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
|
|
end
|
|
|
|
def install
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
|
%w[PyYAML six].each do |r|
|
|
resource(r).stage do
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
end
|
|
end
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
|
|
|
bin.install Dir[libexec/"bin/*"]
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
|
end
|
|
|
|
test do
|
|
assert_match "Usage", shell_output("#{bin}/ccm", 1)
|
|
end
|
|
end
|