charm-tools: sandbox build to hide python libs

See Homebrew/homebrew#23378.
This commit is contained in:
Misty De Meo 2013-12-15 14:22:21 -08:00
parent 8188ed5f11
commit 8818948258

View file

@ -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