diff options
| author | Jack Nagel | 2012-03-23 22:15:33 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-03-23 22:15:33 -0500 |
| commit | 0022b3088eb5de4b3f32ea867dee9f6fab8dbd74 (patch) | |
| tree | ef4df1d363f22bb7f8ff33bd4d315ba21e51cf04 /Library/Formula | |
| parent | ba85e7563e036f3106930f38748c094b13ab2bf3 (diff) | |
| download | homebrew-0022b3088eb5de4b3f32ea867dee9f6fab8dbd74.tar.bz2 | |
xapian: use versioned python lib directory
Fixes #8070.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/xapian.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Library/Formula/xapian.rb b/Library/Formula/xapian.rb index f59b2f1ad..5d84afead 100644 --- a/Library/Formula/xapian.rb +++ b/Library/Formula/xapian.rb @@ -52,11 +52,11 @@ class Xapian < Formula args << arg_for_lang('java') if ARGV.include? '--python' - python_lib = lib + "python" + python_lib = lib/which_python/'site-packages' python_lib.mkpath ENV.append 'PYTHONPATH', python_lib ENV['OVERRIDE_MACOSX_DEPLOYMENT_TARGET'] = '10.4' - ENV['PYTHON_LIB'] = "#{python_lib}" + ENV['PYTHON_LIB'] = python_lib args << "--with-python" else args << "--without-python" @@ -76,12 +76,14 @@ class Xapian < Formula end def caveats - s = "" - if ARGV.include? "--python" - s += <<-EOS.undent - The Python bindings won't function until you amend your PYTHONPATH like so: - export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/python:$PYTHONPATH + if ARGV.include? "--python" then <<-EOS.undent + The Python bindings won't function until you amend your PYTHONPATH like so: + export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH EOS end end + + def which_python + "python" + `python -c 'import sys;print(sys.version[:3])'`.strip + end end |
