language: python
sudo: false

matrix:
  include:
    - python: "2.7"
      dist: xenial
    - python: "3.3"
      dist: trusty
    - python: "3.4"
      dist: trusty
    - python: "3.5"
      dist: xenial
    - python: "3.6"
      dist: xenial
    - python: "3.7"
      dist: xenial

install: pip install -r dev-requirements.txt

script: make test

language: python

matrix:
  include:
    - python: "2.7"
      dist: xenial
      sudo: false
    - python: "3.3"
      dist: trusty
      sudo: false
    - python: "3.4"
      dist: trusty
      sudo: false
    - python: "3.5"
      dist: xenial
      sudo: false
    - python: "3.6"
      dist: xenial
      sudo: false
    - python: "3.7"
      dist: xenial
      sudo: true

install: pip install -r dev-requirements.txt

script: make test

Use `sudo: true` for 3.7 on xenial.
Use `sudo: true` for 3.7 on xenial.

Not sure why this fixes the build issue, but it was recommended in
travis-ci/travis-ci#9069.

Apparently without `sudo` it appears to try to download
https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/14.04/x86_64/python-3.7.tar.bz2
which doesn't exist, instead of
https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/16.04/x86_64/python-3.7.tar.bz2
which does exist.
