aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-08-20 22:41:11 -0500
committerJack Nagel2012-08-20 22:41:29 -0500
commit44197a12f9895e64ded4ded3efb652154a9ac134 (patch)
treef026c78d607a644a39f0c9ced798deaa2fa3f57e /Library
parent61ae9bf581cee233b4b4d42abff5307da00da8f9 (diff)
downloadhomebrew-44197a12f9895e64ded4ded3efb652154a9ac134.tar.bz2
git-cola: prepend correct directory to PYTHONPATH
Fixes #13850. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/git-cola.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Formula/git-cola.rb b/Library/Formula/git-cola.rb
index 73aed27d0..ceeca0ecc 100644
--- a/Library/Formula/git-cola.rb
+++ b/Library/Formula/git-cola.rb
@@ -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