2015-07-06 10:39:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
REQUIREMENTS_FILE=dev-requirements.txt
|
|
|
|
REQUIREMENTS_OUT=dev-requirements.txt.log
|
|
|
|
SETUP_OUT=*.egg-info
|
|
|
|
VENV=.venv
|
2015-07-07 02:39:58 +00:00
|
|
|
DEACTIVE=false
|
2015-07-06 10:39:43 +00:00
|
|
|
|
|
|
|
### set virtualenv
|
|
|
|
if [ -z "$VIRTUAL_ENV" ]; then
|
|
|
|
virtualenv $VENV --no-site-packages
|
|
|
|
source $VENV/bin/activate
|
2015-07-07 02:39:58 +00:00
|
|
|
DEACTIVE=true
|
2015-07-06 10:39:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
### install dependencies
|
|
|
|
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
|
|
|
|
python setup.py develop
|
|
|
|
|
|
|
|
### run tests
|
|
|
|
nosetests
|
2015-07-07 02:39:58 +00:00
|
|
|
|
|
|
|
### deactivate virtualenv
|
|
|
|
if [ $DEACTIVE == true ]; then
|
|
|
|
deactivate
|
|
|
|
fi
|
|
|
|
|