2013-11-09 07:05:16 +00:00
|
|
|
class Ccm < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Create and destroy an Apache Cassandra cluster on localhost"
|
2013-11-09 07:05:16 +00:00
|
|
|
homepage "https://github.com/pcmanus/ccm"
|
2015-04-19 04:06:43 +00:00
|
|
|
url "https://github.com/pcmanus/ccm/archive/ccm-2.0.3.tar.gz"
|
|
|
|
sha256 "591c441c6d1b06595d1112951c6edccec29e5e793ee8562c318eeee84fc62301"
|
2015-02-14 19:59:49 +00:00
|
|
|
head "https://github.com/pcmanus/ccm.git"
|
2013-11-09 07:05:16 +00:00
|
|
|
|
2014-08-20 17:30:34 +00:00
|
|
|
bottle do
|
2016-02-23 16:22:19 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "19ee206337025ca0e62f84869b8eb95d2453ae49e1747f4a55ba8e0921859995" => :el_capitan
|
2015-04-19 04:19:34 +00:00
|
|
|
sha256 "8655aa728be65e6a231da79889fdf82e0d2b9f48e2a048ef83ad36154e3068ec" => :yosemite
|
|
|
|
sha256 "46d15b6f0f213b3b4228bb83f744326edf0ef443b80e7990d338e722150102b6" => :mavericks
|
|
|
|
sha256 "d2f00ee08b94a6d26bc6ef4004c8c68b6365c7de0ff88e0aa57b9d326e85cfd8" => :mountain_lion
|
2014-08-20 17:30:34 +00:00
|
|
|
end
|
|
|
|
|
2015-02-14 19:59:49 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
|
|
|
|
resource "six" do
|
|
|
|
url "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz"
|
2015-04-19 04:06:43 +00:00
|
|
|
sha256 "e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5"
|
2015-02-14 19:59:49 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "psutil" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/psutil/psutil-2.2.1.tar.gz"
|
2015-04-19 04:06:43 +00:00
|
|
|
sha256 "a0e9b96f1946975064724e242ac159f3260db24ffa591c3da0a355361a3a337f"
|
2015-02-14 19:59:49 +00:00
|
|
|
end
|
2013-11-09 07:05:16 +00:00
|
|
|
|
|
|
|
resource "pyyaml" do
|
|
|
|
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz"
|
2015-04-19 04:06:43 +00:00
|
|
|
sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8"
|
2013-11-09 07:05:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2015-02-14 19:59:49 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
|
|
|
%w[six psutil pyyaml].each do |r|
|
|
|
|
resource(r).stage do
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
2013-11-09 07:05:16 +00:00
|
|
|
end
|
|
|
|
|
2015-02-14 19:59:49 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
2013-11-09 07:05:16 +00:00
|
|
|
|
2015-02-14 19:59:49 +00:00
|
|
|
bin.install Dir["#{libexec}/bin/*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2013-11-09 07:05:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-04-19 04:06:43 +00:00
|
|
|
assert_match(/Usage/, shell_output("#{bin}/ccm; 2>&1"))
|
2013-11-09 07:05:16 +00:00
|
|
|
end
|
|
|
|
end
|