aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike McQuaid2014-01-04 13:13:07 +0000
committerMike McQuaid2014-01-04 13:35:45 +0000
commitdacd5f2bb35b903617628e410634b19af6d819ad (patch)
tree832b1b13884bc0d885fe57aef0e4459738b1e21d /Library/Formula
parentef6dde7526a3129a3a4d8d45790ee6b900d206d4 (diff)
downloadhomebrew-dacd5f2bb35b903617628e410634b19af6d819ad.tar.bz2
pssh: cleanup python usage.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pssh.rb22
1 files changed, 3 insertions, 19 deletions
diff --git a/Library/Formula/pssh.rb b/Library/Formula/pssh.rb
index a60c2e2d8..6a01fe51c 100644
--- a/Library/Formula/pssh.rb
+++ b/Library/Formula/pssh.rb
@@ -7,27 +7,11 @@ class Pssh < Formula
depends_on :python
- # TODO: Move this into Library/Homebrew somewhere (see also mitmproxy.rb and ansible.rb).
- def wrap bin_file, pythonpath
- bin_file = Pathname.new bin_file
- libexec_bin = Pathname.new libexec/'bin'
- libexec_bin.mkpath
- mv bin_file, libexec_bin
- bin_file.write <<-EOS.undent
- #!/bin/sh
- PYTHONPATH="#{pythonpath}:$PYTHONPATH" exec "#{libexec_bin}/#{bin_file.basename}" "$@"
- EOS
- end
-
def install
- python do
- system python, "setup.py", "install",
- "--prefix=#{prefix}", "--install-data=#{share}"
- end
+ system "python", "setup.py", "install",
+ "--prefix=#{prefix}", "--install-data=#{share}"
- Dir["#{bin}/*"].each do |bin_file|
- wrap bin_file, python.global_site_packages
- end
+ bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH'])
end
test do