sudo: required
services: [docker]
env:
  global:
    - CIBW_TEST_REQUIRES=nose
    - CIBW_TEST_COMMAND="nosetests {project}/test"
    - TWINE_USERNAME=aflc
matrix:
  include:
    - os: linux
      language: python
      env: PIP=pip
    - os: osx
      language: generic
      env: PIP=pip2

script:
- pip install cibuildwheel==0.10.1
- cibuildwheel --output-dir wheelhouse
- |
    if [[ $TRAVIS_TAG ]]; then
      python -m pip install twine
      python -m twine upload wheelhouse/*.whl
    fi

sudo: required
services: [docker]
env:
  global:
    - CIBW_TEST_REQUIRES=nose
    - CIBW_TEST_COMMAND="nosetests {project}/test"
    - TWINE_USERNAME=aflc
matrix:
  include:
    - os: linux
      language: python
      env:
        - INSTALL_SOURCE=true
        - PIP=pip
    - os: osx
      language: generic
      env:
        - PIP=pip2

script:
- pip install cibuildwheel==0.10.1 twine --user
- cibuildwheel --output-dir wheelhouse
- |
    if [[ $TRAVIS_TAG ]]; then
      if [[ -n $INSTALL_SOURCE ]]; then
        python setup.py sdist
      fi
      twine upload wheelhouse/*.whl
    fi

Install with --user, and upload sdist
Install with --user, and upload sdist
