Commit b001c5ee authored by Marius Gedminas's avatar Marius Gedminas Committed by GitHub

Merge pull request #119 from zopefoundation/fix-wheels

Fix manylinux wheel builds and build them always
parents 4b2f8d87 d3d28615
...@@ -9,7 +9,7 @@ for PYBIN in /opt/python/*/bin; do ...@@ -9,7 +9,7 @@ for PYBIN in /opt/python/*/bin; do
[[ "${PYBIN}" == *"cp36"* ]] || \ [[ "${PYBIN}" == *"cp36"* ]] || \
[[ "${PYBIN}" == *"cp37"* ]] || \ [[ "${PYBIN}" == *"cp37"* ]] || \
[[ "${PYBIN}" == *"cp38"* ]]; then [[ "${PYBIN}" == *"cp38"* ]]; then
"${PYBIN}/pip" install -U pip setuptools wheel cffi "${PYBIN}/pip" install -U pip setuptools cffi
"${PYBIN}/pip" install -e /io/ "${PYBIN}/pip" install -e /io/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/ "${PYBIN}/pip" wheel /io/ -w wheelhouse/
rm -rf /io/build /io/*.egg-info rm -rf /io/build /io/*.egg-info
......
...@@ -2,8 +2,4 @@ ...@@ -2,8 +2,4 @@
set -e -x set -e -x
docker pull $DOCKER_IMAGE docker run --rm -v "$(pwd)":/io $DOCKER_IMAGE $PRE_CMD /io/.manylinux-install.sh
docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/.manylinux-install.sh
pip install twine && twine upload -u zope.wheelbuilder -p $PYPIPASSWORD wheelhouse/*
language: python language: python
dist: xenial
matrix: env:
global:
- TWINE_USERNAME: zope.wheelbuilder
# this sets $PYPIPASSWORD
- secure: "NTWzDr5p8KRPNt+sniTot7csbzC87rzir/XfLtENE0GpQ49FlKw3lBhsDqAPoD8Ea5lwiHXmC/C/ci1UZhFvVEkAoQ2qJlMRnhqUdRJSrqcitmRt0fT6mLaTd+Lr+DxKlBxpssobrEm2G42V/G1s0Ggym04OqF8T+s6MF5ywgJM="
python:
- 2.7
- 3.5
- 3.6
- 3.7
- 3.8
- pypy
- pypy3
jobs:
include: include:
- os: linux
python: 2.7 # Special Linux builds
- name: 2.7-pure - name: "Python: 2.7, pure (no C extensions)"
os: linux
python: 2.7 python: 2.7
env: PURE_PYTHON=1 env: PURE_PYTHON=1
- os: linux
python: 3.5
- os: linux
python: 3.6
# Test for https://github.com/zopefoundation/persistent/issues/86 # Test for https://github.com/zopefoundation/persistent/issues/86
- name: "Python: 3.6, -fno-wrapv"
python: 3.6
env: CFLAGS="-fno-wrapv" env: CFLAGS="-fno-wrapv"
- os: linux
python: pypy - name: "Python: 3.7, pure (no C extensions)"
- os: linux
python: pypy3
- os: linux
python: 3.7
- name: 3.7-pure
os: linux
python: 3.7 python: 3.7
env: PURE_PYTHON=1 env: PURE_PYTHON=1
- os: linux
python: 3.8 - name: "Documentation"
- name: docs
os: linux
python: 3.6 python: 3.6
install: install:
- pip install -U -e .[docs] - pip install -U -e .[docs]
...@@ -35,64 +40,78 @@ matrix: ...@@ -35,64 +40,78 @@ matrix:
- sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
- sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest - sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
after_success: after_success:
# manylinux wheel builds
- name: 64-bit manylinux wheels (all Pythons)
services: docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_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/manylinux1_i686 PRE_CMD=linux32
install: docker pull $DOCKER_IMAGE
script: bash .manylinux.sh
# It's important to use 'macpython' builds to get the least # It's important to use 'macpython' builds to get the least
# restrictive wheel tag. It's also important to avoid # restrictive wheel tag. It's also important to avoid
# 'homebrew 3' because it floats instead of being a specific version. # 'homebrew 3' because it floats instead of being a specific version.
- os: osx - name: Python 2.7 wheels for MacOS
os: osx
language: generic language: generic
env: TERRYFY_PYTHON='macpython 2.7' env: TERRYFY_PYTHON='macpython 2.7'
- os: osx - name: Python 3.5 wheels for MacOS
os: osx
language: generic language: generic
env: TERRYFY_PYTHON='macpython 3.5' env: TERRYFY_PYTHON='macpython 3.5'
- os: osx - name: Python 3.6 wheels for MacOS
os: osx
language: generic language: generic
env: TERRYFY_PYTHON='macpython 3.6.0' env: TERRYFY_PYTHON='macpython 3.6.0'
- os: osx - name: Python 3.7 wheels for MacOS
os: osx
language: generic language: generic
env: TERRYFY_PYTHON='macpython 3.7.0' env: TERRYFY_PYTHON='macpython 3.7.0'
- services:
- docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
before_install:
- if [[ $TRAVIS_TAG ]]; then bash .manylinux.sh; fi
- exit 0
- services:
- docker
env:
- DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
- PRE_CMD=linux32
before_install:
- if [[ $TRAVIS_TAG ]]; then bash .manylinux.sh; fi
- exit 0
before_install: before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git clone https://github.com/MacPython/terryfy; fi - |
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source terryfy/travis_tools.sh; fi if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then get_python_environment $TERRYFY_PYTHON venv; fi git clone https://github.com/MacPython/terryfy
- pip install -U pip setuptools cffi wheel coverage coveralls source terryfy/travis_tools.sh
get_python_environment $TERRYFY_PYTHON venv
fi
install: install:
- pip install -U pip setuptools cffi wheel coverage coveralls
- pip install -U -e .[test] - pip install -U -e .[test]
script: script:
- python --version - python --version
# make sure we can build a wheel # make sure we can build a wheel
- python setup.py bdist_wheel - python setup.py bdist_wheel
# coverage makes PyPy run about 3x slower, but the tests only take # coverage makes PyPy run about 3x slower, but the tests only take
# .4s to begin with (the whole process takes about 1.5), so that's # .4s to begin with (the whole process takes about 1.5), so that's
# still only 4.5s, which is maneagable. # still only 4.5s, which is maneagable.
- coverage run -m zope.testrunner --test-path=. --auto-color --auto-progress - coverage run -m zope.testrunner --test-path=. --auto-color --auto-progress
notifications:
email: false
after_success: after_success:
- coveralls - coveralls
- echo [distutils] > ~/.pypirc - |
- echo index-servers = pypi >> ~/.pypirc if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then
- echo [pypi] >> ~/.pypirc pip install twine
- echo username=zope.wheelbuilder >> ~/.pypirc python setup.py bdist_wheel
- echo password=$PYPIPASSWORD >> ~/.pypirc TWINE_PASSWORD=$PYPIPASSWORD twine upload --skip-existing dist/*
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then pip install twine; fi fi
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then python setup.py bdist_wheel; fi - |
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then twine upload dist/*; fi if [[ $TRAVIS_TAG && -n "$DOCKER_IMAGE" ]]; then
pip install twine
TWINE_PASSWORD=$PYPIPASSWORD twine upload --skip-existing wheelhouse/*
fi
env: notifications:
global: email: false
secure: "NTWzDr5p8KRPNt+sniTot7csbzC87rzir/XfLtENE0GpQ49FlKw3lBhsDqAPoD8Ea5lwiHXmC/C/ci1UZhFvVEkAoQ2qJlMRnhqUdRJSrqcitmRt0fT6mLaTd+Lr+DxKlBxpssobrEm2G42V/G1s0Ggym04OqF8T+s6MF5ywgJM="
cache: pip
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment