aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-04-14 19:36:05 -0500
committerJack Nagel2012-04-14 19:36:05 -0500
commiteca1c0f4719541bb37cceaaf07dae6ec93bd6c1e (patch)
tree2c941d93b7d0811c97e9c13be0c5033cdca432ba /Library
parent2289f98003d5cba6a9b56f12a2da978498dc2a2b (diff)
downloadhomebrew-eca1c0f4719541bb37cceaaf07dae6ec93bd6c1e.tar.bz2
pyqwt: use correct site-packages directory
Fixes #11646. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/pyqwt.rb16
1 files changed, 13 insertions, 3 deletions
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