Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always build manylinux wheels #146

Merged
merged 1 commit into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .manylinux-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ for PYBIN in /opt/python/*/bin; do
[[ "${PYBIN}" == *"cp38"* ]]; then
"${PYBIN}/pip" install -e /io/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
rm -rf /io/build /io/*.egg-info
rm -rf /io/build /io/*.egg-info
fi
done

Expand Down
6 changes: 1 addition & 5 deletions .manylinux.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@

set -e -x

docker pull $DOCKER_IMAGE

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/*
docker run --rm -v "$(pwd)":/io $DOCKER_IMAGE $PRE_CMD /io/.manylinux-install.sh
146 changes: 81 additions & 65 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,94 @@
language: python
sudo: false
matrix:
include:
- os: linux
python: 2.7
- os: linux
python: 3.5
- os: linux
python: 3.6
- os: linux
python: 3.7
- os: linux
python: 3.8
- os: linux
python: pypy
- os: linux
python: pypy3
# 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.
- os: osx
language: generic
env: TERRYFY_PYTHON='macpython 2.7'
- os: osx
language: generic
env: TERRYFY_PYTHON='macpython 3.5'
- os: osx
language: generic
env: TERRYFY_PYTHON='macpython 3.6.0'
- os: osx
language: generic
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

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:

# 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
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; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source terryfy/travis_tools.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then get_python_environment $TERRYFY_PYTHON venv; fi
- |
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
- pip install -U -e ".[test]"

script:
- coverage run setup.py test -q
notifications:
email: false
- python --version
- coverage run setup.py -q test
- python setup.py bdist_wheel

after_success:
- coveralls
- echo [distutils] > ~/.pypirc
- echo index-servers = pypi >> ~/.pypirc
- echo [pypi] >> ~/.pypirc
- echo username=zope.wheelbuilder >> ~/.pypirc
- echo password=$PYPIPASSWORD >> ~/.pypirc
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then pip install twine; 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
- coveralls
- |
if [[ $TRAVIS_TAG && "$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 pip install twine
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops I messed this up: https://travis-ci.org/zopefoundation/zope.interface/builds/610352389

/usr/bin/python: No module named pip

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#148

twine upload --skip-existing dist/*
fi
- |
if [[ $TRAVIS_TAG && -n "$DOCKER_IMAGE" ]]; then
pip install twine
twine upload --skip-existing wheelhouse/*
fi

env:
global:
secure: "CeOq8/6F8IlbRpKEk2z3RPD/q5cBCPXGOUgjYryG/c+7P6SCTxaTKfxiJPqT3sGgO8x/HcJVuvZghyqCPvysk3cbnq4SiMtI1S0hS/N3DFsGZHn25YQBipAYjA4YDUb6GqCpsSUIXdbGMEzG7DOSB6c+49+//wkjbBFHmPNWvMQ="
notifications:
email: false

cache: pip

before_cache:
- rm -f $HOME/.cache/pip/log/debug.log