git-cola: prepend correct directory to PYTHONPATH

Fixes Homebrew/homebrew#13850.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-08-20 22:41:11 -05:00
parent 6089580687
commit 53bc9bb920

View file

@ -19,7 +19,7 @@ class GitCola < Formula
end
def install
ENV.prepend 'PYTHONPATH', "#{HOMEBREW_PREFIX}/lib/python", ':'
ENV.prepend 'PYTHONPATH', "#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages", ':'
system "make", "prefix=#{prefix}", "install"
if ARGV.include? '--build-docs'
@ -30,4 +30,8 @@ class GitCola < Formula
"install", "install-html"
end
end
def which_python
"python" + `python -c 'import sys;print(sys.version[:3])'`.strip
end
end