Skip to content

Commit

Permalink
charm-tools: sandbox build to hide python libs
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Dec 15, 2013
1 parent 8188ed5 commit 8818948
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Formula/charm-tools.rb
Expand Up @@ -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

Expand Down

0 comments on commit 8818948

Please sign in to comment.