aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-05-16 19:55:06 -0500
committerJack Nagel2012-05-16 19:56:16 -0500
commitddb522344df1a7f3b8e9274e3ab1f4dc7f68187e (patch)
treea1d6e9a8967f0537f60c7aeebaed13741f71fc55 /Library
parent78e76b317f93fabf46c88f8ef439f18dd29fd1d0 (diff)
downloadhomebrew-ddb522344df1a7f3b8e9274e3ab1f4dc7f68187e.tar.bz2
pygtk: add PYTHONPATH caveats
Closes #10905. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/pygtk.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Formula/pygtk.rb b/Library/Formula/pygtk.rb
index 3632f5d1d..dbfa4c410 100644
--- a/Library/Formula/pygtk.rb
+++ b/Library/Formula/pygtk.rb
@@ -22,6 +22,16 @@ class Pygtk < Formula
system "make install"
end
+ def caveats; <<-EOS.undent
+ For non-Homebrew Python, you need to amend your PYTHONPATH like so:
+ export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH
+ EOS
+ end
+
+ def which_python
+ "python" + `python -c 'import sys;print(sys.version[:3])'`.strip
+ end
+
def test
mktemp do
(Pathname.pwd+'test.py').write <<-EOS.undent