diff options
| author | Jack Nagel | 2012-04-14 19:36:05 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-04-14 19:36:05 -0500 |
| commit | eca1c0f4719541bb37cceaaf07dae6ec93bd6c1e (patch) | |
| tree | 2c941d93b7d0811c97e9c13be0c5033cdca432ba /Library | |
| parent | 2289f98003d5cba6a9b56f12a2da978498dc2a2b (diff) | |
| download | homebrew-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.rb | 16 |
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 |
