koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | FULL="$1" |
| 4 | |
koder aka kdanilov | 5ea9df0 | 2015-12-04 21:46:06 +0200 | [diff] [blame] | 5 | pushd $(dirname "$0") > /dev/null |
| 6 | SCRIPTPATH=$(pwd -P) |
| 7 | popd > /dev/null |
| 8 | |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 9 | function install_apt() { |
| 10 | apt-get install -y python-openssl python-novaclient python-cinderclient \ |
| 11 | python-keystoneclient python-glanceclient python-faulthandler \ |
| 12 | python-pip |
| 13 | |
| 14 | if [ "$FULL" == "--full" ] ; then |
| 15 | apt-get install -y python-scipy python-numpy python-matplotlib python-psutil |
| 16 | fi |
| 17 | } |
| 18 | |
| 19 | |
| 20 | function install_yum() { |
| 21 | yum -y install pyOpenSSL python-novaclient python-cinderclient \ |
koder aka kdanilov | 5ea9df0 | 2015-12-04 21:46:06 +0200 | [diff] [blame] | 22 | python-keystoneclient python-glanceclient \ |
| 23 | python-pip python-ecdsa |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 24 | |
| 25 | if [ "$FULL" == "--full" ] ; then |
| 26 | yum -y install scipy numpy python-matplotlib python-psutil |
| 27 | fi |
| 28 | } |
| 29 | |
| 30 | if which apt-get >/dev/null; then |
| 31 | install_apt |
| 32 | else |
| 33 | if which yum >/dev/null; then |
| 34 | install_yum |
| 35 | else |
| 36 | echo "Error: Neither apt-get, not yum installed. Can't install deps" |
| 37 | exit 1 |
| 38 | fi |
| 39 | fi |
| 40 | |
koder aka kdanilov | 5ea9df0 | 2015-12-04 21:46:06 +0200 | [diff] [blame] | 41 | pip install -r "$SCRIPTPATH/../requirements.txt" |
koder aka kdanilov | 8fbb27f | 2015-07-17 22:23:31 +0300 | [diff] [blame] | 42 | |
| 43 | if [ "$FULL" == "--full" ] ; then |
| 44 | pip install oktest iso8601==0.1.10 |
| 45 | fi |