diff options
| author | Jack Nagel | 2012-03-25 17:27:03 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-03-25 17:27:30 -0500 |
| commit | 6e06ddf7d480c856a27dd2f23efae9f34b538aa3 (patch) | |
| tree | 3f25274660e5bf267c7e44b9e3df68cd37a409cc /Library | |
| parent | be77491c7ce0ab083ba73e834eb118e3b36dd479 (diff) | |
| download | homebrew-6e06ddf7d480c856a27dd2f23efae9f34b538aa3.tar.bz2 | |
qscintilla: use versioned python lib directory
Fixes #10366.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/qscintilla2.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Library/Formula/qscintilla2.rb b/Library/Formula/qscintilla2.rb index 2e8cf059d..6482d2801 100644 --- a/Library/Formula/qscintilla2.rb +++ b/Library/Formula/qscintilla2.rb @@ -9,7 +9,7 @@ class Qscintilla2 < Formula depends_on 'sip' def install - ENV.prepend 'PYTHONPATH', "#{HOMEBREW_PREFIX}/lib/python", ':' + ENV.prepend 'PYTHONPATH', "#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages", ':' cd 'Qt4' do inreplace 'qscintilla.pro' do |s| @@ -27,7 +27,7 @@ class Qscintilla2 < Formula cd 'Python' do system 'python', 'configure.py', "-o", lib, "-n", include, "--apidir=#{prefix}/qsci", - "--destdir=#{lib}/python/PyQt4", + "--destdir=#{lib}/#{which_python}/site-packages/PyQt4", "--sipdir=#{share}/sip" system 'make' system 'make', 'install' @@ -35,9 +35,12 @@ class Qscintilla2 < Formula end def caveats; <<-EOS.undent - This formula includes a Python module that will not be functional until you - amend your PYTHONPATH: - export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/python:$PYTHONPATH + 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 end |
