forked from funkey/waterz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build manylinux wheel in travis (funkey#4)
* include requirements.txt files; add manifest.in file * add travis build of manylinux wheels * make matrix * put multiple environment variables in one line * add build-wheels.sh * give sudo for build wheel * make the travis build wheel script executable * remove sudo * the docker in pypa is centos rather than ubuntu * add sudo * fix install libboost * use python3.7-dev * fix boost * travis build will upload manylinux wheel * add back docker env * add env * change order * move twine username and password to travis setting * this should work * rename package name * add python3.5 and remove python 3.8
- Loading branch information
Showing
3 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,48 @@ | ||
language: python | ||
language: python | ||
|
||
python: | ||
- '3.5' | ||
- '3.6' | ||
- '3.7-dev' | ||
|
||
services: | ||
- docker | ||
|
||
env: | ||
- DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64 PLAT=manylinux1_x86_64 | ||
- DOCKER_IMAGE=quay.io/pypa/manylinux1_i686 PRE_CMD=linux32 PLAT=manylinux1_i686 | ||
- DOCKER_IMAGE=quay.io/pypa/manylinux2010_x86_64 PLAT=manylinux2010_x86_64 | ||
|
||
before_install: | ||
- docker pull $DOCKER_IMAGE | ||
|
||
install: | ||
- sudo find /usr -name '*.pyc' -delete | ||
- sudo apt update | ||
- sudo apt install libboost-dev | ||
- pip install -r requirements.txt | ||
- python setup.py install | ||
- python setup.py install | ||
- pip install pytest | ||
- pip install coveralls | ||
- pip install pytest-cov # to get .coverage report via pytest | ||
- pip install pytest-cov | ||
|
||
script: | ||
- pytest --cov-append --cov=./waterz ./tests --verbose | ||
|
||
after_success: | ||
- coveralls | ||
- coveralls | ||
- chmod +x ./travis/build-wheels.sh | ||
- docker run --rm -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/travis/build-wheels.sh | ||
- ls wheelhouse/ | ||
- | | ||
if [[ $TRAVIS_TAG ]]; then | ||
python -m pip install twine | ||
python -m twine upload wheelhouse/waterz*.whl | ||
fi | ||
matrix: | ||
allow_failures: | ||
- python: '3.7-dev' | ||
- python: 3.8-dev | ||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
set -e -x | ||
|
||
# Install a system package required by our library | ||
#yum check-update | ||
yum install -y boost-devel | ||
|
||
# Compile wheels | ||
for PYBIN in /opt/python/*/bin; do | ||
"${PYBIN}/pip" install -r /io/requirements.txt | ||
"${PYBIN}/pip" wheel /io/ -w wheelhouse/ | ||
done | ||
|
||
# Bundle external shared libraries into the wheels | ||
for whl in wheelhouse/*.whl; do | ||
auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/ | ||
done | ||
|
||
# Install packages and test | ||
for PYBIN in /opt/python/*/bin/; do | ||
"${PYBIN}/pip" install waterz --no-index -f /io/wheelhouse | ||
done |