2015-12-15 17:09:24 +03:00
|
|
|
#!/bin/bash -x
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [[ $# < 3 ]]; then
|
|
|
|
echo "usage: $0 <python-path> <pip-date> <install-mode>"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2015-12-13 14:51:23 +03:00
|
|
|
if [ ! -d ".build" ]; then
|
2015-12-15 17:09:24 +03:00
|
|
|
virtualenv .build --python $1
|
2015-12-13 14:51:23 +03:00
|
|
|
fi
|
|
|
|
. .build/bin/activate
|
2015-12-15 17:09:24 +03:00
|
|
|
|
|
|
|
# install
|
|
|
|
pip install -U pip
|
|
|
|
python pip-date.py $2 pip setuptools wheel six
|
|
|
|
pip install -r requirements.txt
|
|
|
|
if [[ "$3" == "pip" ]]; then
|
|
|
|
python setup.py sdist;
|
|
|
|
pip install dist/*;
|
|
|
|
fi
|
|
|
|
if [[ "$3" == "setup-install" ]]; then
|
|
|
|
python setup.py install;
|
|
|
|
fi
|
|
|
|
if [[ "$3" == "setup-develop" ]]; then
|
|
|
|
python setup.py develop;
|
|
|
|
pip install -e .;
|
|
|
|
fi
|
|
|
|
pip install pytest
|
|
|
|
pip list
|
|
|
|
|
|
|
|
# script
|
2015-12-15 18:15:03 +03:00
|
|
|
cd .build
|
2015-12-15 17:09:24 +03:00
|
|
|
python -m spacy.en.download
|
|
|
|
python -m pytest ../spacy/ -x --models --vectors --slow
|