language: python
cache: pip

python:
  - 2.7
  - 3.4
  - 3.5
  - 3.6
  - pypy
  - pypy3

matrix:
  include:
    - language: generic
      python: 2.7
      os: osx
    - language: generic
      python: 3.5
      os: osx
    - language: generic
      python: 3.6
      os: osx
  allow_failures:
    - python: pypy3

install:
  - |
      if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then
        export PYENV_ROOT="$HOME/.pyenv"
        if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
          pushd "$PYENV_ROOT" && git pull && popd
        else
          rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
        fi
        export PYPY_VERSION="5.4.1"
        "$PYENV_ROOT/bin/pyenv" install --skip-existing "pypy-$PYPY_VERSION"
        virtualenv --python="$PYENV_ROOT/versions/pypy-$PYPY_VERSION/bin/python" "$HOME/virtualenvs/pypy-$PYPY_VERSION"
        source "$HOME/virtualenvs/pypy-$PYPY_VERSION/bin/activate"
      fi
  - if [[ $TRAVIS_OS_NAME == osx ]]; then brew update; fi
  - if [[ $TRAVIS_OS_NAME == osx ]]; then brew install openssl; fi
  - if [[ $TRAVIS_OS_NAME == osx ]]; then export LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include"; fi
  - pip install --upgrade pip virtualenv
  - virtualenv --python=python env
  - source env/bin/activate
  - make install

script:
  - make test

after_success:
  - bash <(curl -s https://codecov.io/bash)

sudo: false

language: python
cache: pip

python:
  - 2.7
  - 3.4
  - 3.5
  - 3.6
  - pypy
  - pypy3

matrix:
  include:
    - language: generic
      python: 2.7
      env: PYTHON_VERSION=2
      os: osx
    - language: generic
      python: 3.6
      env: PYTHON_VERSION=3
      os: osx
  allow_failures:
    - python: pypy3

install:
  - if [[ $TRAVIS_OS_NAME == osx ]]; then brew update; fi
  - if [[ $TRAVIS_OS_NAME == osx ]]; then brew install openssl python$PYTHON_VERSION; fi
  - if [[ $TRAVIS_OS_NAME == osx ]]; then export LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include"; fi
  - virtualenv --python=python$PYTHON_VERSION env
  - source env/bin/activate
  - make install
  - if [[ $TRAVIS_PYTHON_VERSION == pypy ]]; then pip install lxml==3.8.0; fi

script:
  - make test

after_success:
  - bash <(curl -s https://codecov.io/bash)

sudo: false

Fix failures from Travis build config updates
Fix failures from Travis build config updates
