Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save asyncee/6387841 to your computer and use it in GitHub Desktop.
Save asyncee/6387841 to your computer and use it in GitHub Desktop.

Revisions

  1. asyncee revised this gist Aug 31, 2013. 1 changed file with 39 additions and 14 deletions.
    53 changes: 39 additions & 14 deletions install xapian inside virtualenv
    Original file line number Diff line number Diff line change
    @@ -1,21 +1,46 @@
    apt-get install zlib1g-dev
    apt-get install g++
    #/bin/bash

    export VENV=$VIRTUAL_ENV
    mkdir -p $VENV/packages && cd $VENV/packages
    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

    curl -O http://oligarchy.co.uk/xapian/1.2.10/xapian-core-1.2.10.tar.gz
    curl -O http://oligarchy.co.uk/xapian/1.2.10/xapian-bindings-1.2.10.tar.gz
    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

    tar xzvf xapian-core-1.2.10.tar.gz
    tar xzvf xapian-bindings-1.2.10.tar.gz

    cd $VENV/packages/xapian-core-1.2.10
    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-1.2.10
    cd $VENV/packages/xapian-bindings-$VER
    ./configure --prefix=$VENV --with-python && make && make install

    echo "Checking xapian installation:"
    echo
    python -c "import xapian"

    python -c "import xapian"
    if [ $? -eq 0 ]; then
    echo "ok"
    else
    echo
    echo "failed"
    fi
  2. asyncee revised this gist Aug 30, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install xapian inside virtualenv
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ apt-get install zlib1g-dev
    apt-get install g++

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

    curl -O http://oligarchy.co.uk/xapian/1.2.10/xapian-core-1.2.10.tar.gz
    curl -O http://oligarchy.co.uk/xapian/1.2.10/xapian-bindings-1.2.10.tar.gz
  3. asyncee revised this gist Aug 30, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install xapian inside virtualenv
    Original file line number Diff line number Diff line change
    @@ -4,8 +4,8 @@ apt-get install g++
    export VENV=$VIRTUAL_ENV
    mkdir $VENV/packages && cd $VENV/packages

    curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.2.10.tar.gz
    curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.2.10.tar.gz
    curl -O http://oligarchy.co.uk/xapian/1.2.10/xapian-core-1.2.10.tar.gz
    curl -O http://oligarchy.co.uk/xapian/1.2.10/xapian-bindings-1.2.10.tar.gz

    tar xzvf xapian-core-1.2.10.tar.gz
    tar xzvf xapian-bindings-1.2.10.tar.gz
  4. asyncee revised this gist Aug 30, 2013. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions install xapian inside virtualenv
    Original file line number Diff line number Diff line change
    @@ -4,18 +4,18 @@ apt-get install g++
    export VENV=$VIRTUAL_ENV
    mkdir $VENV/packages && cd $VENV/packages

    curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.0.16.tar.gz
    curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.0.16.tar.gz
    curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.2.10.tar.gz
    curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.2.10.tar.gz

    tar xzvf xapian-core-1.0.16.tar.gz
    tar xzvf xapian-bindings-1.0.16.tar.gz
    tar xzvf xapian-core-1.2.10.tar.gz
    tar xzvf xapian-bindings-1.2.10.tar.gz

    cd $VENV/packages/xapian-core-1.0.16
    cd $VENV/packages/xapian-core-1.2.10
    ./configure --prefix=$VENV && make && make install

    export LD_LIBRARY_PATH=$VENV/lib

    cd $VENV/packages/xapian-bindings-1.0.16
    cd $VENV/packages/xapian-bindings-1.2.10
    ./configure --prefix=$VENV --with-python && make && make install

    python -c "import xapian"
  5. vinilios revised this gist Oct 1, 2009. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions install xapian inside virtualenv
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    apt-get install zlib1g-dev
    apt-get install g++

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

  6. vinilios created this gist Oct 1, 2009.
    18 changes: 18 additions & 0 deletions install xapian inside virtualenv
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    export VENV=$VIRTUAL_ENV
    mkdir $VENV/packages && cd $VENV/packages

    curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.0.16.tar.gz
    curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.0.16.tar.gz

    tar xzvf xapian-core-1.0.16.tar.gz
    tar xzvf xapian-bindings-1.0.16.tar.gz

    cd $VENV/packages/xapian-core-1.0.16
    ./configure --prefix=$VENV && make && make install

    export LD_LIBRARY_PATH=$VENV/lib

    cd $VENV/packages/xapian-bindings-1.0.16
    ./configure --prefix=$VENV --with-python && make && make install

    python -c "import xapian"