Forked from vinilios/install xapian inside virtualenv
Last active
December 4, 2020 05:39
-
-
Save asyncee/6387841 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
echo "Packages needed for installation:" | |
echo "zlib1g-dev g++" | |
echo | |
echo "You can install it on debian-based distros with command:" | |
echo "apt-get install zlib1g-dev g++" | |
echo | |
if [ -z "$VIRTUAL_ENV" ]; then | |
echo "This script must be run inside a virtualenv" | |
echo "To activate virtualenv, run:" | |
echo "source env/bin/activate" | |
exit; | |
fi | |
VER="1.2.10" | |
echo "Installing xapian $VER" | |
export VENV=$VIRTUAL_ENV | |
mkdir -p $VENV/packages && cd $VENV/packages | |
curl -O http://oligarchy.co.uk/xapian/$VER/xapian-core-$VER.tar.gz | |
curl -O http://oligarchy.co.uk/xapian/$VER/xapian-bindings-$VER.tar.gz | |
tar xzvf xapian-core-$VER.tar.gz | |
tar xzvf xapian-bindings-$VER.tar.gz | |
cd $VENV/packages/xapian-core-$VER | |
./configure --prefix=$VENV && make && make install | |
export LD_LIBRARY_PATH=$VENV/lib | |
cd $VENV/packages/xapian-bindings-$VER | |
./configure --prefix=$VENV --with-python && make && make install | |
echo "Checking xapian installation:" | |
echo | |
python -c "import xapian" | |
if [ $? -eq 0 ]; then | |
echo "ok" | |
else | |
echo | |
echo "failed" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment