This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
2014-01-21 15:47:06 +01:00
|
|
|
PROJECT=portail-citoyen
|
|
|
|
CTL=${PROJECT}
|
|
|
|
VENV=${PROJECT}-venv
|
|
|
|
|
2014-01-21 22:48:18 +01:00
|
|
|
if [ -f /etc/debian_release ]; then
|
|
|
|
if ! dpkg -l build-essential python-dev >/dev/null 2>&1; then
|
|
|
|
aptitude install python-dev build-essential
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-01-21 15:47:06 +01:00
|
|
|
if [ "$VIRTUAL_ENV" = "" ]; then
|
|
|
|
if which mkvirtualenv >/dev/null 2>&1; then
|
|
|
|
workon $PROJECT || (mkvirtualenv $PROJECT; workon $PROJECT)
|
|
|
|
else
|
|
|
|
if [ ! -d $VENV ]; then
|
|
|
|
virtualenv --system-site-packages $VENV 2>/dev/null || virtualenv $VENV
|
|
|
|
fi
|
|
|
|
. ./$VENV/bin/activate
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
pip install --upgrade setuptools
|
|
|
|
pip install --upgrade pip
|
2014-03-18 13:56:41 +01:00
|
|
|
pip install --upgrade pyOpenSSL==0.13 ndg-httpsclient requests pyasn1
|
2014-01-21 15:47:06 +01:00
|
|
|
sed -i 's/^MAX = 64/MAX = 200/' $VENV/lib/python*/site-packages/ndg/httpsclient/subj_alt_name.py
|
|
|
|
pip install --upgrade --process-dependency-links -r requirements.txt
|
|
|
|
if [ ! -f $PROJECT.db ]; then
|
|
|
|
./$CTL syncdb --all --noinput
|
|
|
|
./$CTL migrate --fake
|
|
|
|
if [ -f load-base-data.sh ]; then
|
|
|
|
./load-base-data.sh
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ "$1" != "norun" ]; then
|
|
|
|
export DEBUG=1
|
|
|
|
./$CTL runserver
|
|
|
|
fi
|