2013-10-09 21:53:19 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class CharmTools < Formula
|
|
|
|
homepage 'https://launchpad.net/charm-tools'
|
2014-02-18 16:57:09 +00:00
|
|
|
url 'https://launchpad.net/charm-tools/1.2/1.2.9/+download/charm-tools-1.2.9-1.tar.gz'
|
|
|
|
sha1 '9da948b85dc2fc547335d28669f694338b0b77e8'
|
2013-10-09 21:53:19 +00:00
|
|
|
|
2014-04-30 22:36:21 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
2013-10-09 21:53:19 +00:00
|
|
|
depends_on 'libyaml'
|
|
|
|
|
|
|
|
def install
|
2014-01-04 13:03:17 +00:00
|
|
|
ENV.prepend_create_path 'PYTHONPATH', libexec+'lib/python2.7/site-packages'
|
|
|
|
system "python", "setup.py", "install", "--prefix=#{libexec}"
|
2013-12-15 22:22:21 +00:00
|
|
|
|
2014-01-04 13:03:17 +00:00
|
|
|
bin.install Dir[libexec/'bin/*charm*']
|
|
|
|
bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH'])
|
2013-10-09 21:53:19 +00:00
|
|
|
end
|
|
|
|
|
2014-01-04 13:03:17 +00:00
|
|
|
test do
|
|
|
|
system "#{bin}/charm", "list"
|
2013-10-09 21:53:19 +00:00
|
|
|
end
|
|
|
|
end
|