diff options
| author | Matt Stump | 2013-11-08 23:05:16 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-08-21 08:32:30 +0100 |
| commit | b8c3aa58c05d59b5996e48bd251799f302787f1d (patch) | |
| tree | 47fbc557e5d5546030c61bdcd21e69ea421d50d9 | |
| parent | 50680d2ac6fc68a518b35a6bc88a3bbbe40f5c0d (diff) | |
| download | homebrew-b8c3aa58c05d59b5996e48bd251799f302787f1d.tar.bz2 | |
ccm 1.1 (new formula) - Cassandra Cluster Manager
| -rw-r--r-- | Library/Formula/ccm.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Formula/ccm.rb b/Library/Formula/ccm.rb new file mode 100644 index 000000000..c0bbb11e0 --- /dev/null +++ b/Library/Formula/ccm.rb @@ -0,0 +1,32 @@ +require "formula" + +class Ccm < Formula + homepage "https://github.com/pcmanus/ccm" + url "https://github.com/pcmanus/ccm/archive/ccm-1.1.tar.gz" + sha1 "cb216c633f04cf1821bfafa7d1c1a2e73444f20e" + + head "https://github.com/pcmanus/ccm.git", :branch => :master + + resource "pyyaml" do + url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz" + sha1 "1a2d5df8b31124573efb9598ec6d54767f3c4cd4" + end + + def install + resource("pyyaml").stage do + system "python", "setup.py", "install", "--prefix=#{libexec}" + end + + system "python", "setup.py", "install", "--prefix=#{prefix}" + + ENV["PYTHONPATH"] = "#{lib}/python2.7/site-packages" + ENV.prepend_create_path "PYTHONPATH", "#{libexec}/lib/python2.7/site-packages" + bin.env_script_all_files(libexec + "bin", :PYTHONPATH => ENV["PYTHONPATH"]) + end + + test do + # We can't test CCM core functionality without a Cassandra node to talk to. + # Instead, just make sure it runs. + system "#{bin}/ccm -h 2>&1 | grep 'Usage:'" + end +end |
