Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix setting of Python version in .travis.yml
The environment variable TRAVIS_PYTHON_VERSION does not get set until after the environment variable section has already run, so the previous version just set _PYTHON_VERSION to an empty variable. This then caused conda to install the current version of Python, rather than the targetting version. We set _PYTHON_VERSION in an `if` test so that the Mac versions can be neatly overridden in the environment setup with explicit values. We have to use the [[ -z "$_PYTHON_VERSION" ]] test syntax rather than the more modern and robust [[ ! -v _PYTHON_VERSION ]] because the Travis macOS machines only have bash 3.2 (released 2006) and the latter syntax is in bash 4.2 (released 2011). Thanks, Apple!
- Loading branch information