fonttools/.travis/install.sh
Cosimo Lupo ac9790ca89
travis: 'brew install python' on macOS, use generic py3 tox env
formula is now named just 'python'.
For the homebrew version installed on Travis (which we don't
autoupdate) we *should* get python3.6 with this currently.

It might be the case that python3 is already installed on
Travis macOS image, but need to check.

We call tox with 'TOXENV=py3' so that when Travis updates its homebrew,
we'll get python3.7 automatically.

Finally, use virtualenv instead of venv on mac to fix tox bootstrapping issue

https://github.com/pypa/virtualenv/issues/1051
https://github.com/pre-commit/pre-commit/issues/631
https://travis-ci.org/fonttools/fonttools/jobs/427582922#L214

fixup
2018-09-12 12:09:43 +02:00

31 lines
815 B
Bash
Executable File

#!/bin/bash
set -e
set -x
ci_requirements="pip setuptools tox"
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
# 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/
else
echo "unsupported $TOXENV: "${TOXENV}
exit 1
fi
source .venv/bin/activate
fi
python -m pip install $ci_requirements