2015-07-14 07:38:23 +00:00
|
|
|
#!/bin/bash
|
2015-07-06 10:39:43 +00:00
|
|
|
|
|
|
|
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
|
2015-07-14 07:38:23 +00:00
|
|
|
virtualenv $VENV --no-site-packages --always-copy
|
2015-07-06 10:39:43 +00:00
|
|
|
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
|
|
|
|
|