Forked from carymrobbins/install_xapian_inside_virtualenv_osx.sh
Created
February 13, 2016 06:15
-
-
Save adriancmiranda/7afa4ba59df4dba7e93b to your computer and use it in GitHub Desktop.
Install xapian in a virtualenv on Mac OS X using Homebrew.
This file contains hidden or 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 | |
set -e | |
if [ -z "$(which brew)" ]; then | |
echo "This script requires Homebrew." | |
exit | |
fi | |
if [ -z "$VIRTUAL_ENV" ]; then | |
echo "This script must be run inside a virtualenv" | |
exit | |
fi | |
export VENV=$VIRTUAL_ENV | |
mkdir -p $VENV/packages && cd $VENV/packages | |
echo "Fetching xapian source" | |
brew fetch xapian | |
tar xzvf $(brew --cache xapian) | |
tar xzvf $(ls $(brew --cache)/xapian--bindings*) | |
cd $VENV/packages/xapian-core-* | |
./configure --prefix=$VENV && make && make install | |
export LD_LIBRARY_PATH=$VENV/lib | |
cd $VENV/packages/xapian-bindings-* | |
./configure --prefix=$VENV --with-python && make && make install | |
echo "Checking xapian installation:" | |
echo | |
python -c "import xapian" | |
test $? -eq 0 && echo successful || echo failure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment