From 9d4230e088c848b7a355e06253956c765e7c7470 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Tue, 12 Nov 2019 09:49:09 +0200 Subject: Add support for Python 3.8 Also let's use the latest floating PyPy versions on Travis CI. --- .travis.yml | 23 ++++++++++++----------- CHANGES.rst | 2 ++ appveyor.yml | 2 ++ setup.py | 1 + tox.ini | 2 +- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9244184..05c149d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,28 @@ language: python -dist: xenial + python: - 2.7 - 3.5 - 3.6 - 3.7 - - pypy2.7-6.0.0 - - pypy3.5-6.0.0 -script: - - coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress - -after_success: - - coveralls -notifications: - email: false + - 3.8 + - pypy + - pypy3 install: - pip install -U pip setuptools - pip install -U coveralls coverage zope.testrunner - pip install -U -e ".[test]" +script: + - coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress -cache: pip +after_success: + - coveralls +notifications: + email: false + +cache: pip before_cache: - rm -f $HOME/.cache/pip/log/debug.log diff --git a/CHANGES.rst b/CHANGES.rst index 39e7fbc..14227b1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,8 @@ - Drop support for Python 3.4. +- Add support for Python 3.8. + 4.3.1 (2018-10-19) ================== diff --git a/appveyor.yml b/appveyor.yml index 2913229..25cf34a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,6 +13,8 @@ environment: - python: 36-x64 - python: 37 - python: 37-x64 + - python: 38 + - python: 38-x64 install: - "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%" diff --git a/setup.py b/setup.py index dea33ec..9931a10 100644 --- a/setup.py +++ b/setup.py @@ -123,6 +123,7 @@ setup( 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', diff --git a/tox.ini b/tox.ini index 78b2a54..7ee9522 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py27,py35,py36,py37,pypy,pypy3,coverage,docs + py27,py35,py36,py37,py38,pypy,pypy3,coverage,docs [testenv] deps = -- cgit v1.2.1 From 3b8ab1e0d20f1b3867b3fa5b4411aae1e31d4233 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Tue, 12 Nov 2019 09:54:12 +0200 Subject: Also build manylinux2010 and MacOS wheels --- .manylinux-install.sh | 21 +++++++++++++++ .manylinux.sh | 5 ++++ .travis.yml | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++ appveyor.yml | 9 ++++++- 4 files changed, 106 insertions(+), 1 deletion(-) create mode 100755 .manylinux-install.sh create mode 100755 .manylinux.sh diff --git a/.manylinux-install.sh b/.manylinux-install.sh new file mode 100755 index 0000000..e9daeac --- /dev/null +++ b/.manylinux-install.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -e -x + +# Compile wheels +for PYBIN in /opt/python/*/bin; do + if [[ "${PYBIN}" == *"cp27"* ]] || \ + [[ "${PYBIN}" == *"cp35"* ]] || \ + [[ "${PYBIN}" == *"cp36"* ]] || \ + [[ "${PYBIN}" == *"cp37"* ]] || \ + [[ "${PYBIN}" == *"cp38"* ]]; then + "${PYBIN}/pip" install -e /io/ + "${PYBIN}/pip" wheel /io/ -w wheelhouse/ + rm -rf /io/build /io/*.egg-info + fi +done + +# Bundle external shared libraries into the wheels +for whl in wheelhouse/zope.i18nmessageid*.whl; do + auditwheel repair "$whl" -w /io/wheelhouse/ +done diff --git a/.manylinux.sh b/.manylinux.sh new file mode 100755 index 0000000..2fed778 --- /dev/null +++ b/.manylinux.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e -x + +docker run --rm -v "$(pwd)":/io $DOCKER_IMAGE $PRE_CMD /io/.manylinux-install.sh diff --git a/.travis.yml b/.travis.yml index 05c149d..1e1d08f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,11 @@ language: python +env: + global: + TWINE_USERNAME: zope.wheelbuilder + TWINE_PASSWORD: + secure: "VQxFZo+4W6XAX94+kJY8dx90uKnmsJIBLPHruK5Xz2E7bFM3t7MlcFN5A0v90fB7BJUiKyQpO67R+wF3XIaqd7UDcI0NVcNihKkzkP8rE4CLsHIhjWU9lKuO0juXegv+0p8ztHV9anvSXN3WbaYk7elXiv4CXxpTeVBy77KK8gE=" + python: - 2.7 - 3.5 @@ -9,16 +15,82 @@ python: - pypy - pypy3 +jobs: + include: + + # 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 + 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 + env: TERRYFY_PYTHON='macpython 3.6.0' + - 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: - pip install -U pip setuptools - pip install -U coveralls coverage zope.testrunner - pip install -U -e ".[test]" script: + - python --version - coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress + - python setup.py -q bdist_wheel after_success: - 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 diff --git a/appveyor.yml b/appveyor.yml index 25cf34a..d643125 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,6 +18,13 @@ environment: install: - "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%" + - ps: | + $env:PYTHON = "C:\\Python${env:PYTHON}" + if (-not (Test-Path $env:PYTHON)) { + curl -o install_python.ps1 https://raw.githubusercontent.com/matthew-brett/multibuild/11a389d78892cf90addac8f69433d5e22bfa422a/install_python.ps1 + .\install_python.ps1 + } + - ps: if (-not (Test-Path $env:PYTHON)) { throw "No $env:PYTHON" } - echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat" - pip install -e . @@ -33,6 +40,6 @@ artifacts: name: wheel deploy_script: - - ps: if ($env:APPVEYOR_REPO_TAG -eq $TRUE) { pip install twine; twine upload dist/* } + - ps: if ($env:APPVEYOR_REPO_TAG -eq $TRUE) { pip install twine; twine upload --skip-existing dist/* } deploy: on -- cgit v1.2.1