homebrew-core/Formula/mackup.rb
Alan LaMielle 15bb0297a2 mackup: use PYTHONPATH wrapper
Problems with the current mackup formula were reported in lra/mackup#330
and pull request Homebrew/homebrew#32833 was submitted by lra to address them.  However,
it was suggested to use a different approach that is more standard for
stand-alone Python scripts.  This patch applies the suggested changes.

Closes Homebrew/homebrew#32967.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-10-06 15:05:02 +01:00

21 lines
639 B
Ruby

require "formula"
class Mackup < Formula
homepage "https://github.com/lra/mackup"
url "https://github.com/lra/mackup/archive/0.7.4.tar.gz"
sha1 "6de195ec94018c0e225f115278a9f8d720ad5c75"
head "https://github.com/lra/mackup.git"
def install
ENV.prepend_create_path "PYTHONPATH", lib/"python2.7/site-packages"
system "python", "setup.py", "install", "--prefix=#{prefix}",
"--single-version-externally-managed",
"--record=installed.txt"
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
system "#{bin}/mackup", "--help"
end
end