Skip to content

Commit

Permalink
Build linux wheel.
Browse files Browse the repository at this point in the history
  • Loading branch information
whtsky committed Apr 27, 2016
1 parent 0f2d4d8 commit 30cc538
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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/
2 changes: 2 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nose
cython
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 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

0 comments on commit 30cc538

Please sign in to comment.