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"
|
2016-06-22 17:01:38 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/c6/11/f9d69d65ca3f8995aea37d94c8636b3662340a355ab61b583316a1cc36d1/ccm-2.1.6.tar.gz"
|
|
|
|
sha256 "16b1d1db66239e7af801ec1a6d4fc796c0155243db40676064648e597577ed9c"
|
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
|
2016-06-22 17:10:51 +00:00
|
|
|
sha256 "17a2cc69b2808dad1ad47018bd40d6db645c0af332822622bdb3e7a48727c65c" => :el_capitan
|
|
|
|
sha256 "e70194684f0841f64bb6411245f4358ee8e5cd0a90675b1d6e4796fa0e1594ea" => :yosemite
|
|
|
|
sha256 "b27407e39fb003847b6827de1919af0dd207325544a0caefd16c57a893629054" => :mavericks
|
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
|
|
|
|
|
2016-06-22 17:01:38 +00:00
|
|
|
resource "PyYAML" do
|
|
|
|
url "https://files.pythonhosted.org/packages/75/5e/b84feba55e20f8da46ead76f14a3943c8cb722d40360702b2365b91dec00/PyYAML-3.11.tar.gz"
|
|
|
|
sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8"
|
2015-02-14 19:59:49 +00:00
|
|
|
end
|
2013-11-09 07:05:16 +00:00
|
|
|
|
2016-06-22 17:01:38 +00:00
|
|
|
resource "six" do
|
|
|
|
url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz"
|
|
|
|
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
|
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"
|
2016-06-22 17:01:38 +00:00
|
|
|
%w[PyYAML six].each do |r|
|
2015-02-14 19:59:49 +00:00
|
|
|
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
|
|
|
|
2016-06-22 17:01:38 +00:00
|
|
|
bin.install Dir[libexec/"bin/*"]
|
2015-02-14 19:59:49 +00:00
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2013-11-09 07:05:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2016-06-22 17:01:38 +00:00
|
|
|
assert_match "Usage", shell_output("#{bin}/ccm", 1)
|
2013-11-09 07:05:16 +00:00
|
|
|
end
|
|
|
|
end
|