language: python
sudo: false

python:
  - 2.7
  - 3.4
  - 3.5
  - 3.6
os:
  - linux
env:
  global:
    - PYTHON=python
    - PIP=pip
    - TEST_COMMAND="coverage -q"

matrix:
  include:
    - language: generic
      python: 2.7
      os: osx
      env: PYTHON=python2 PIP=pip2
    - language: generic
      python: 3.6
      os: osx
      env: PYTHON=python3 PIP=pip3
    - python: 2.7
      os: linux
      env: TEST_COMMAND=lint

before_install:
  - set -e
  - |
    if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
      shell_session_update() { :; }
      if [ "${PYTHON}" = "python3" ]; then
        brew update
        brew install ${PYTHON}
      fi
      cp test/scripts/sitecustomize.py .
    fi
install:
  - ${PIP} install codecov .[test]
script:
  - ${PYTHON} setup.py ${TEST_COMMAND}
after_success:
  - codecov

language: python
sudo: false

python:
  - 2.7
  - 3.4
  - 3.5
  - 3.6
os:
  - linux
env:
  global:
    - PYTHON=python
    - PIP=pip
    - TEST_COMMAND="coverage -q"

matrix:
  include:
    - language: generic
      python: 2.7
      os: osx
      env: PYTHON=python2 PIP=pip2
    - language: generic
      python: 3.6
      os: osx
      env: PYTHON=python3 PIP=pip3
    - python: 2.7
      os: linux
      env: TEST_COMMAND=lint

before_install:
  - set -e
  - |
    if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
      shell_session_update() { :; }
      if [ "${PYTHON}" = "python3" ]; then
        brew update
        brew install ${PYTHON} || brew upgrade ${PYTHON}
      fi
      cp test/scripts/sitecustomize.py .
    fi
install:
  - ${PIP} install codecov .[test]
script:
  - ${PYTHON} setup.py ${TEST_COMMAND}
after_success:
  - codecov

Fix Python 3 on Travis macOS builders again
Fix Python 3 on Travis macOS builders again
