diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/charm-tools.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Library/Formula/charm-tools.rb b/Library/Formula/charm-tools.rb index 115d7529d..c69244cee 100644 --- a/Library/Formula/charm-tools.rb +++ b/Library/Formula/charm-tools.rb @@ -10,7 +10,19 @@ class CharmTools < Formula def install python do - system python, "setup.py", "install", "--prefix=#{prefix}" + 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 |
