summaryrefslogtreecommitdiffstats
path: root/testsuite/install.sh
blob: 6895034d5912fffb382f79910d455656a1e4a9b0 (plain)
1
2
3
4
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
#!/bin/bash

# install script for Travis-CI

pip install -r testsuite/requirements.txt --use-mirrors

PYVER=$(python -c 'import sys;print(".".join(str(v) for v in sys.version_info[0:2]))')

if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" ]]; then
    pip install --use-mirrors unittest2
fi

if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then
    pip install --use-mirrors PyYAML pyinotify
    if [[ $PYVER == "2.5" ]]; then
        # markdown 2.2+ doesn't work on py2.5
        pip install --use-mirrors simplejson 'markdown<2.2'
    fi
    if [[ ${PYVER:0:1} == "2" ]]; then
        # django supports py3k, but South doesn't, and the django bits
        # in bcfg2 require South
        pip install cheetah 'django<1.5' 'South<0.8' M2Crypto
    fi
else
    # python < 2.6 requires M2Crypto for SSL communication, not just
    # for encryption support
    if [[ $PYVER == "2.5" || $PYVER == "2.4" ]]; then
        pip install --use-mirrors M2crypto
    fi
fi