blob: 5d4a60ce83682f93d9321c0a04e9a798dab82151 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
require 'formula'
class CharmTools < Formula
homepage 'https://launchpad.net/charm-tools'
url 'https://launchpad.net/charm-tools/1.2/1.2.5/+download/charm-tools-1.2.5.tar.gz'
sha1 'eb425dd554e471c6bae740d91cbc1b873c7e586d'
depends_on :python
depends_on 'libyaml'
def install
python do
system python, "setup.py", "install", "--prefix=#{libexec}"
end
# charm-tools installs its own copies of many, many common python
# libraries; these shim scripts makes sure the privately-installed
# tools can find them
Dir[libexec/'bin/*charm*'].each do |tool|
toolname = File.basename(tool)
(bin/toolname).write <<-EOS.undent
#!/bin/sh
export PYTHONPATH=#{libexec}/lib/python2.7/site-packages
exec #{tool}
EOS
end
end
def caveats
python.standard_caveats if python
end
end
|