language: python env: global: TWINE_USERNAME: zope.wheelbuilder TWINE_PASSWORD: secure: "AyR5QxUuZKdmywiepdBG0r8hgFQfaEf2hTxOg/HiXisVNcs1sUPjephBP4MqQBbf1/qxLM95F6Mw3sKneO3gDDQSGCsmvY1MWlDc+6R5TgqVBuOoONji5zGQH7v9RR8IPOyple8BNlFePl1hQ8r0dOT1U6rDVh5FkNJgHYE9OJ4=" python: - 2.7 - 3.5 - 3.6 - 3.7 - 3.8 - pypy - pypy3 jobs: include: - name: Documentation python: 3.6 install: - pip install -U -e .[docs] script: - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html - sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest after_success: - name: PyPy C Extensions env: PURE_PYTHON=0 python: pypy - name: CPython No C Extension env: PURE_PYTHON=1 python: 3.8 # manylinux wheel builds - name: 64-bit manylinux wheels (all Pythons) services: docker env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_x86_64 install: docker pull $DOCKER_IMAGE script: bash .manylinux.sh - name: 32-bit manylinux wheels (all Pythons) services: docker env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_i686 PRE_CMD=linux32 install: docker pull $DOCKER_IMAGE script: bash .manylinux.sh # It's important to use 'macpython' builds to get the least # restrictive wheel tag. It's also important to avoid # 'homebrew 3' because it floats instead of being a specific version. - name: Python 2.7 wheels for MacOS os: osx language: generic # We require at least 2.7.15 to upload wheels. # See https://github.com/zopefoundation/BTrees/issues/113 env: TERRYFY_PYTHON='macpython 2.7.17' - name: Python 3.5 wheels for MacOS os: osx language: generic env: TERRYFY_PYTHON='macpython 3.5' - name: Python 3.6 wheels for MacOS os: osx language: generic # NB: 3.6.0 causes https://github.com/nedbat/coveragepy/issues/703 # NB: 3.6.1 had that ABI regression (fixed in 3.6.2) and would be a bad # version to use env: TERRYFY_PYTHON='macpython 3.6.2' - name: Python 3.7 wheels for MacOS os: osx language: generic env: TERRYFY_PYTHON='macpython 3.7.0' before_install: - | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git clone https://github.com/MacPython/terryfy source terryfy/travis_tools.sh get_python_environment $TERRYFY_PYTHON venv fi install: # virtualenv 20.0 together with terryfy macOS is broken, at least # with CPython 2.7.17 (https://github.com/pypa/virtualenv/issues/1555): # it doesn't install or activate the virtualenv correctly and PATH # isn't setup right. So try to use `python -m` to workaround that. - python -m pip install -U pip setuptools - python -m pip install -U coveralls coverage - python -m pip install -U -e ".[test]" script: - which python - python --version - python -m coverage run -m unittest discover -s src - python setup.py -q bdist_wheel after_success: - python -m coveralls - | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then # macpython 3.5 doesn't support recent TLS protocols which causes twine # upload to fail, so we use the system Python to run twine /usr/bin/python -m ensurepip --user /usr/bin/python -m pip install --user -U pip /usr/bin/python -m pip install --user -U -I twine /usr/bin/python -m twine check dist/* if [[ $TRAVIS_TAG ]]; then /usr/bin/python -m twine upload --skip-existing dist/* fi fi - | if [[ -n "$DOCKER_IMAGE" ]]; then pip install twine twine check wheelhouse/* if [[ $TRAVIS_TAG ]]; then twine upload --skip-existing wheelhouse/* fi fi notifications: email: false cache: pip before_cache: - rm -f $HOME/.cache/pip/log/debug.log