Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #/bin/bash
  2.  
  3. set -e
  4.  
  5. if [ -z "$(which brew)" ]; then
  6. echo "This script requires Homebrew."
  7. exit
  8. fi
  9.  
  10. if [ -z "$VIRTUAL_ENV" ]; then
  11. echo "This script must be run inside a virtualenv"
  12. exit
  13. fi
  14.  
  15. export VENV=$VIRTUAL_ENV
  16. mkdir -p $VENV/packages && cd $VENV/packages
  17.  
  18. echo "Fetching xapian source"
  19. brew fetch xapian
  20.  
  21. tar xzvf $(brew --cache xapian)
  22. tar xzvf $(ls $(brew --cache)/xapian--bindings*)
  23.  
  24. cd $VENV/packages/xapian-core-*
  25. ./configure --prefix=$VENV && make && make install
  26.  
  27. export LD_LIBRARY_PATH=$VENV/lib
  28.  
  29. cd $VENV/packages/xapian-bindings-*
  30. ./configure --prefix=$VENV --with-python && make && make install
  31.  
  32. echo "Checking xapian installation:"
  33. echo
  34. python -c "import xapian"
  35.  
  36. test $? -eq 0 && echo successful || echo failure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement