aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-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