diff options
| author | Misty De Meo | 2013-12-15 14:22:21 -0800 |
|---|---|---|
| committer | Misty De Meo | 2013-12-15 14:23:14 -0800 |
| commit | 986cb6764e4d00ebea9974bbbab09924f145be2f (patch) | |
| tree | 89d126459a4bc9a35795c9082a0ece49d144fa01 /Library/Formula | |
| parent | b2facb3f3bd8c7cd9db77a866562bb48d0dc62ba (diff) | |
| download | homebrew-986cb6764e4d00ebea9974bbbab09924f145be2f.tar.bz2 | |
charm-tools: sandbox build to hide python libs
See #23378.
Diffstat (limited to 'Library/Formula')
| -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 |
