view quickinstall @ 2109:38b5c2746f83

raise minimum requirement to python 2.7 now that debian wheezy is stable (and thus even debian stable has python 2.7 - almost 3 years after the python 2.7 release), it is time to move on. there are some nice features in 2.7 - we can use them now: http://docs.python.org/2.7/whatsnew/2.7.html there is also no risk any more that language or library features creep in unnoticed that are incompatible with the minimum requirement. we also save some time as we don't have to test on / care for 2.6 any more. about this changeset: most should be self-explanatory, except this: MoinMoin/constants/keys.py - we could not use unicode key constants yet due to a bug in pre-2.6.5 python that did not allow unicode keys in kwargs. The change in MoinMoin/storage/middleware/indexing.py is also related to that, we just had to make sure keys are str, not unicode as that dict later was exploded into a function call like f(**doc). notes for developers: if you developed on 2.6 until now, you need to create a fresh new virtualenv using python 2.7.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 04 May 2013 16:08:33 +0200
parents 492fd5a8080d
children
line wrap: on
line source
#!/bin/bash
# create a virtual environment in directory $DIR/
#
# set PYTHON environment variable to change the python version
# set DIR environment variable to change the virtual env directory
# set VIRTUALENV environment variable to change the virtualenv command
# for example: PYTHON=/usr/bin/pypy DIR=env-pypy ./quickinstall
#
# needs: virtualenv, pip

DLC=dlc

# if DIR is not given, use ./env
if [ -z "$DIR" ]; then
    DIR=env
fi

# find the right python version
if [ -z "$PYTHON" ]; then
    for PYTHON in python{2.7,2,}; do
        hash $PYTHON 2>&- && break
    done
fi

# find the right virtualenv version
if [ -z "$VIRTUALENV" ]; then
    for VIRTUALENV in virtualenv{2.7,2,}; do
        hash $VIRTUALENV 2>&- && break
    done
fi

$VIRTUALENV --no-site-packages --python $PYTHON $DIR || exit 1

source $DIR/bin/activate || exit 1

# first install babel, moin's setup.py will emit a warning if it is not there
pip install --download-cache=$DLC babel || exit 1

# "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 --download-cache=$DLC -e . || exit 1

# compile the translations
python setup.py compile_catalog --statistics || exit 1