language: python
sudo: false

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

matrix:
  include:
    - language: generic
      python: 2.7
      os: osx
    - language: generic
      python: 3.5
      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
      brew update
      brew install ${PYTHON}
    fi
install:
  - |
    if [ "${TEST_COMMAND}" = "lint" ]; then
      ${PIP} install flake8
    fi
  - ${PIP} install .
script:
  - ${PYTHON} setup.py ${TEST_COMMAND}

language: python
sudo: false

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

matrix:
  include:
    - language: generic
      python: 2.7
      os: osx
    - language: generic
      python: 3.5
      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
      brew update
      if [ "${PYTHON}" = "python3" ]; then
        brew install ${PYTHON}
      fi
    fi
install:
  - |
    if [ "${TEST_COMMAND}" = "lint" ]; then
      ${PIP} install flake8
    fi
  - ${PIP} install .
script:
  - ${PYTHON} setup.py ${TEST_COMMAND}

Fix installation of Python on OS X builders
Fix installation of Python on OS X builders
