From 31149333e6b8619826789a61a5a5ad5e51b0012f Mon Sep 17 00:00:00 2001 From: Gjorgji Jankovski Date: Wed, 17 Apr 2019 11:56:12 +0200 Subject: [PATCH] add travis for building wheels --- .travis.yml | 33 +++++++++++++++++++++++++++++++++ travis/build-wheels.sh | 17 +++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .travis.yml create mode 100755 travis/build-wheels.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b14a587 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,33 @@ +notifications: + email: false + +matrix: + include: + - sudo: required + services: + - docker + env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64 + - sudo: required + services: + - docker + env: DOCKER_IMAGE=quay.io/pypa/manylinux1_i686 + PRE_CMD=linux32 + +install: + - docker pull $DOCKER_IMAGE + +script: + - echo mock + +before_deploy: + - docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/travis/build-wheels.sh + +deploy: + provider: releases + api_key: $GIT_TOKEN + file_glob: true + file: wheelhouse/* + # deploy when a new tag is pushed + on: + tags: true + diff --git a/travis/build-wheels.sh b/travis/build-wheels.sh new file mode 100755 index 0000000..14f0e87 --- /dev/null +++ b/travis/build-wheels.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e -x + +# Install a system package required by our library +yum install -y atlas-devel + +pushd /io +# Compile wheels +for PYBIN in /opt/python/cp3*/bin; do + "${PYBIN}/python" setup.py bdist_wheel --dist-dir wheelhouse +done +popd + +# Bundle external shared libraries into the wheels +for whl in /io/wheelhouse/*.whl; do + auditwheel repair "$whl" -w /io/wheelhouse/ +done