aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/charm-tools.rb14
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