mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-26 19:09:48 -05:00
1 parent
080cd150ac
commit
fc1d1173b4
1 file changed
+15
@@ -11,11 +11,26 @@ class Duplicity < Formula
|
||||
|
||||
option :universal
|
||||
|
||||
# TODO: Move this into Library/Homebrew somewhere (see also 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" "#{libexec_bin}/#{bin_file.basename}" "$@"
|
||||
EOS
|
||||
end
|
||||
|
||||
def install
|
||||
python do
|
||||
ENV.universal_binary if build.universal?
|
||||
# Install mostly into libexec
|
||||
system python, "setup.py", "install", "--prefix=#{prefix}"
|
||||
Dir["#{bin}/*"].each do |bin_file|
|
||||
wrap bin_file, python.site_packages
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user