2017-01-02 22:04:09 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# Resolve all server dependencies that the application requires to run.
|
|
|
|
|
|
|
|
# Stop on errors
|
|
|
|
set -e
|
|
|
|
|
2015-09-17 00:35:26 -07:00
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
echo "Installing dependencies..."
|
2017-01-14 05:03:50 +00:00
|
|
|
# Requirements_all.txt states minimum pip version as 7.0.0 however,
|
|
|
|
# parameter --only-binary doesn't work with pip < 7.0.0. Causing
|
|
|
|
# python3 -m pip install -r requirements_all.txt to fail unless pip upgraded.
|
|
|
|
|
|
|
|
if ! python3 -c 'import pkg_resources ; pkg_resources.require(["pip>=7.0.0"])' 2>/dev/null ; then
|
|
|
|
echo "Upgrading pip..."
|
|
|
|
python3 -m pip install -U pip
|
|
|
|
fi
|
2015-12-18 00:35:53 -08:00
|
|
|
python3 -m pip install -r requirements_all.txt
|
2015-09-17 00:35:26 -07:00
|
|
|
|
2015-12-17 09:17:24 -08:00
|
|
|
REQ_STATUS=$?
|
|
|
|
|
2017-01-14 05:03:50 +00:00
|
|
|
echo "Installing development dependencies..."
|
2015-12-27 16:57:16 -08:00
|
|
|
python3 -m pip install -r requirements_test.txt
|
2015-12-17 09:17:24 -08:00
|
|
|
|
|
|
|
REQ_DEV_STATUS=$?
|
|
|
|
|
|
|
|
if [ $REQ_DEV_STATUS -eq 0 ]
|
|
|
|
then
|
|
|
|
exit $REQ_STATUS
|
|
|
|
else
|
|
|
|
exit $REQ_DEV_STATUS
|
|
|
|
fi
|