martinsam
3/16/2015 - 8:40 AM

install xapian inside virtualenv

pip install django-haystack==2.3.1
pip install git+https://github.com/notanumber/xapian-haystack.git
# Check and correct /lib/python2.7/site-packages/xapian_backend.py L64 for python 2.6


apt-get install uuid-dev
apt-get install zlib1g-dev
apt-get install g++

export VENV=$VIRTUAL_ENV
mkdir $VENV/packages && cd $VENV/packages

curl -O http://oligarchy.co.uk/xapian/1.2.19/xapian-core-1.2.19.tar.xz
curl -O http://oligarchy.co.uk/xapian/1.2.19/xapian-bindings-1.2.19.tar.xz

tar -Jxvf xapian-core-1.2.19.tar.xz
tar -Jxvf xapian-bindings-1.2.19.tar.xz
cd $VENV/packages/xapian-core-1.2.19
./configure --prefix=$VENV && make && make install

export LD_LIBRARY_PATH=$VENV/lib

cd $VENV/packages/xapian-bindings-1.2.19
./configure --prefix=$VENV PYTHON=$VENV/bin/python2.6 PYTHON_LIB=$VENV/lib/python2.6 --with-python --without-ruby --without-php --without-tcl && make && make install

python -c "import xapian"