Files
deb-python-dcos/bin/env.sh
José Armando García Sancio 95e7c53f5c Add dependency for concurrent.futures (#680)
Conditionally install futures in py27
2016-07-08 17:18:39 -07:00

32 lines
736 B
Bash
Executable File

#!/bin/bash -e
BASEDIR=`dirname $0`/..
if [ ! -d "$BASEDIR/env" ]; then
virtualenv -p python3 -q $BASEDIR/env --prompt='(dcos) '
echo "Virtualenv created."
if [ -f "$BASEDIR/env/bin/activate" ]; then
source $BASEDIR/env/bin/activate
else
$BASEDIR/env/Scripts/activate
fi
echo "Virtualenv activated."
pip install -r $BASEDIR/requirements.txt
pip install -e $BASEDIR
echo "Requirements installed."
elif [ ! -f "$BASEDIR/env/bin/activate" -o "$BASEDIR/setup.py" -nt "$BASEDIR/env/bin/activate" ]; then
source $BASEDIR/env/bin/activate
echo "Virtualenv activated."
pip install -r $BASEDIR/requirements.txt
pip install -e $BASEDIR
echo "Requirements installed."
fi