2015-12-12 17:56:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2016-12-25 18:08:29 +00:00
|
|
|
ci_requirements="pip setuptools tox"
|
|
|
|
|
2016-12-26 16:44:01 +00:00
|
|
|
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
|
|
|
if [[ ${TOXENV} == *"py27"* ]]; then
|
|
|
|
# install pip on the system python
|
|
|
|
curl -O https://bootstrap.pypa.io/get-pip.py
|
|
|
|
python get-pip.py --user
|
|
|
|
python -m pip install --user virtualenv
|
|
|
|
python -m virtualenv .venv/
|
|
|
|
elif [[ ${TOXENV} == *"py3"* ]]; then
|
2018-09-11 18:46:45 +02:00
|
|
|
# install current python3 with homebrew
|
|
|
|
# NOTE: the formula is now named just "python"
|
|
|
|
brew install python
|
|
|
|
command -v python3
|
|
|
|
python3 --version
|
|
|
|
python3 -m pip install virtualenv
|
|
|
|
python3 -m virtualenv .venv/
|
2016-12-26 16:44:01 +00:00
|
|
|
else
|
|
|
|
echo "unsupported $TOXENV: "${TOXENV}
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
source .venv/bin/activate
|
2015-12-12 17:56:05 +00:00
|
|
|
fi
|
|
|
|
|
2016-12-26 16:44:01 +00:00
|
|
|
python -m pip install $ci_requirements
|