Newer
Older
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
echo "-----------------------------------------------"
echo "Current directory: $(pwd)"
echo "Python executable: ${PY_EXE}"
echo "-----------------------------------------------"
# {{{ clean up
rm -Rf .env
rm -Rf build
find . -name '*.pyc' -delete
# }}}
git submodule update --init --recursive
# {{{ virtualenv
VENV_VERSION="virtualenv-13.0.3"
rm -Rf "$VENV_VERSION"
curl -k https://pypi.python.org/packages/source/v/virtualenv/$VENV_VERSION.tar.gz | tar xfz -
VIRTUALENV="${PY_EXE} -m venv"
${VIRTUALENV} -h > /dev/null || VIRTUALENV="$VENV_VERSION/virtualenv.py --no-setuptools -p ${PY_EXE}"
if [ -d ".env" ]; then
echo "**> virtualenv exists"
else
echo "**> creating virtualenv"
${VIRTUALENV} .env
fi
. .env/bin/activate
# }}}
# {{{ setuptools
#curl -k https://bitbucket.org/pypa/setuptools/raw/bootstrap-py24/ez_setup.py | python -
#curl -k https://ssl.tiker.net/software/ez_setup.py | python -
#curl -k https://bootstrap.pypa.io/ez_setup.py | python -
SETUPTOOLS_VERSION="setuptools-17.1.1"
curl -k https://pypi.python.org/packages/source/s/setuptools/$SETUPTOOLS_VERSION.tar.gz | tar xfz -
$PY_EXE $SETUPTOOLS_VERSION/setup.py install
# }}}
curl -k https://gitlab.tiker.net/inducer/pip/raw/7.0.3/contrib/get-pip.py | python -
# Not sure why pip ends up there, but in Py3.3, it sometimes does.
export PATH=`pwd`/.env/local/bin:$PATH
PIP="${PY_EXE} $(which pip)"
grep -v dnspython requirements.txt > req.txt
if [[ "$PY_EXE" = python2* ]]; then
$PIP install dnspython
else
$PIP install dnspython3
fi
$PIP install -r req.txt
cp local_settings.example.py local_settings.py