diff --git a/.travis.yml b/.travis.yml index 1d97252..00d8c20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,20 @@ language: python -python: - - 2.6 - - 2.7 - - 3.3 - - 3.4 - - 3.5 - - pypy +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: - - pip install cython - - cython bencoder.pyx - - python setup.py install -script: nosetests + - docker pull $DOCKER_IMAGE + +script: + - docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/travis/build-wheels.sh + - ls wheelhouse/ \ No newline at end of file diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..ea2e9ad --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,2 @@ +nose +cython diff --git a/travis/build-wheels.sh b/travis/build-wheels.sh new file mode 100644 index 0000000..bfe7c00 --- /dev/null +++ b/travis/build-wheels.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e -x + +# Install a system package required by our library +yum install -y atlas-devel + +# Compile wheels +for PYBIN in /opt/python/*/bin; do + ${PYBIN}/pip install -r /io/dev-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 -w /io/wheelhouse/ +done + +# Install packages and test +for PYBIN in /opt/python/*/bin/; do + ${PYBIN}/pip install bencoder.pyx --no-index -f /io/wheelhouse + ${PYBIN}/nosetests /io/ +done