Source

moin-2.0 / quickinstall

Full commit
#!/bin/bash
# create a virtual environment in directory $DIR/
# needs: curl or wget, unzip, gzip, tar, pip

DIR=env
PYTHON=python

virtualenv --no-site-packages --python $PYTHON $DIR

source $DIR/bin/activate

download()
{
    if test -x /usr/bin/curl
    then
        echo /usr/bin/curl -L -o $1 $2
        /usr/bin/curl -L -o $1 $2
    else
        # github redirects to a url where its cert does not match :(
        echo wget -nc --no-check-certificate -O $1 $2
        wget -nc --no-check-certificate -O $1 $2
    fi
}

# get some 3rd party stuff and unpack them into $DIR/, where the default
# wikiconfig.py expects them. should be replaced by packaging.
# we do this FIRST, so that breakage with pip install is better visible.

download $DIR/svgedit.tgz http://static.moinmo.in/files/packages/svg-edit.tar.gz
tar xz -C $DIR/ -f $DIR/svgedit.tgz

# first install babel, moin's setup.py will emit a warning if it is not there
pip install babel
# first install XStatic, XStatic-jQuery's setup.py will fail if it is not there
pip install XStatic

# "install" moin2 from repo to the env, this will also install required python
# packages from pypi. we do this LAST, so that breakage is better visible.
pip install -e .

# compile the translations
python setup.py compile_catalog --statistics