Skip to content

Commit

Permalink
build manylinux wheel on travis
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Aug 13, 2019
1 parent 472e0f7 commit addcd1c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 29 deletions.
53 changes: 24 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
notifications:
email: false

matrix:
include:
- language: python
python: 2.7
- language: python
python: 3.5
- language: python
python: 3.6
- language: generic
python: 3.6
os: osx
- sudo: required
services:
- docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
PLAT=manylinux1_x86_64
- sudo: required
services:
- docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
PRE_CMD=linux32
PLAT=manylinux1_i686
- sudo: required
services:
- docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_x86_64
PLAT=manylinux2010_x86_64

install:
- curl curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
- export PATH="$HOME/.cargo/bin:$PATH"
- rustc -V
- pip install -r requirements.txt
- pip install -r requirements-test.txt
- docker pull $DOCKER_IMAGE

script:
- python setup.py sdist bdist_wheel
- pip install -e .
- pytest test.py
notifications:
email: false
deploy:
provider: pypi
user: BYPyPi
on:
tags: true
distributions: sdist bdist_wheel
skip_existing: true
skip_cleanup: true
password:
secure: pviWvC8QhtNMULoPuTYx4j8d0lMGt/eYBYnfUIgTO/WmA7iZmsSzsHrCL1xLIjmFTtcktpJ4P7qVT2IUHSlZ2Iu3MnuSE2nowZMIv7DxjBo7f3Wzb4udDSZbpZ+Rd7SQ9bQJhCH+fGB3AhJNHDKF3MfPC8RSrne4174kMhKfpYGxQ4xLnzAtuxC0Uy8BsYk5xoVQq0euTAx3q4YpO4lGacWHP/acaUqznn+u39PtuTTCSdwSOYKs6RZ8cFsk3505mqIA6bfPLH2DJ+OaNvhLOsk2eIYe35Hg/yUed3ujeCJJ4m/F6u+RZvu4JQZ5hW4siFVEPsdvsyC/yuUIDUvF9wyhN8W7hLpBiRpwaBD3slQX3SJQpcIjiLLPxAriYy9yrTLGAKyV3Hsol8FbhBL97RvYddc3UIYVi7PBL+H6UHixdpXZkk63DLXJHSuvX8mCoFbF7utk5dGZYZx6yZhPXoe/jIp1WZgOKGXi7OTbx4cLVGbU2OZc+z2Nv9QFmEyEWjhDpAJT0z6XUvq+MPN+V13SWY7R3Y39zyCWwUuBJVu0BgDi4b0cUk7oDZh/HtObjJkrl+v+TQ3KielUGNh5ATm4ER3gusMS+33Y9n+uFJZ4AZuuzMqYb1fzdMl3xT8tYe35USGhjsya3Bq1Tj3arD+25zlBHeXhdNGekOgA9jg=
- docker run --rm -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD bash /io/travis/build-wheels.sh
- ls wheelhouse/
22 changes: 22 additions & 0 deletions travis/build-wheels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
set -e -x

# Install Rust toolchain
curl https://sh.rustup.rs -sSf | sh -s -- -y

# Compile wheels
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/pip" install -r /io/requirements-test.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 urlquote --no-index -f /io/wheelhouse
(cd "$HOME"; "${PYBIN}/pytest" /io/test.py)
done

0 comments on commit addcd1c

Please sign in to comment.