From eca1c0f4719541bb37cceaaf07dae6ec93bd6c1e Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 14 Apr 2012 19:36:05 -0500 Subject: pyqwt: use correct site-packages directory Fixes #11646. Signed-off-by: Jack Nagel --- Library/Formula/pyqwt.rb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/pyqwt.rb b/Library/Formula/pyqwt.rb index 175f2c9a9..9eceac79d 100644 --- a/Library/Formula/pyqwt.rb +++ b/Library/Formula/pyqwt.rb @@ -20,14 +20,24 @@ class Pyqwt < Formula cd "configure" do system "python", "configure.py", - "--module-install-path=#{lib}/python/PyQt4/Qwt5/", - "--sip-install-path=#{share}/sip/Qwt5/", - "--uic-install-path=#{lib}/python/PyQt4/", + "--module-install-path=#{lib}/#{which_python}/site-packages/PyQt4/Qwt5", + "--sip-install-path=#{share}/sip/Qwt5", + "--uic-install-path=#{lib}/#{which_python}/site-packages/PyQt4", "-Q", "../qwt-5.2" system "make install" end 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 system "python -c 'from PyQt4 import Qwt5 as Qwt'" end -- cgit v1.2.3