language: python
cache: pip
sudo: false
python:
  - 2.6
  - 2.7
  - 3.4
  - 3.5
  - 3.6
  - pypy
  - pypy3
matrix:
  include:
  - python: 3.6
    env: TOXENV=flake8
  - python: 3.6
    env: TOXENV=docs
  - python: 3.7
    dist: xenial
install: pip install tox
script: tox -e "${TOXENV:-$(echo py$TRAVIS_PYTHON_VERSION | tr -d . | sed -e 's/pypypy/pypy/')}"

language: python
cache: pip
sudo: false
python:
  - 2.7
  - 3.4
  - 3.5
  - 3.6
  - pypy
matrix:
  include:
  - python: 2.6
    dist: trusty
  - python: pypy3
    dist: trusty
  - python: 3.6
    env: TOXENV=flake8
  - python: 3.6
    env: TOXENV=docs
install: pip install tox
script: tox -e "${TOXENV:-$(echo py$TRAVIS_PYTHON_VERSION | tr -d . | sed -e 's/pypypy/pypy/')}"

Fix Travis build to use trusty for some Python versions
Fix Travis build to use trusty for some Python versions

Python 2.6 is not available xenial which is the default now. The
coverage also does not seem to work for pypy3.
