Skip to content

Commit 30cc538

Browse files
committed
Build linux wheel.
1 parent 0f2d4d8 commit 30cc538

File tree

3 files changed

+40
-11
lines changed

3 files changed

+40
-11
lines changed

.travis.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
language: python
22

3-
python:
4-
- 2.6
5-
- 2.7
6-
- 3.3
7-
- 3.4
8-
- 3.5
9-
- pypy
3+
matrix:
4+
include:
5+
- sudo: required
6+
services:
7+
- docker
8+
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
9+
- sudo: required
10+
services:
11+
- docker
12+
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
13+
PRE_CMD=linux32
1014

1115
install:
12-
- pip install cython
13-
- cython bencoder.pyx
14-
- python setup.py install
15-
script: nosetests
16+
- docker pull $DOCKER_IMAGE
17+
18+
script:
19+
- docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/travis/build-wheels.sh
20+
- ls wheelhouse/

dev-requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nose
2+
cython

travis/build-wheels.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
set -e -x
3+
4+
# Install a system package required by our library
5+
yum install -y atlas-devel
6+
7+
# Compile wheels
8+
for PYBIN in /opt/python/*/bin; do
9+
${PYBIN}/pip install -r /io/dev-requirements.txt
10+
${PYBIN}/pip wheel /io/ -w wheelhouse/
11+
done
12+
13+
# Bundle external shared libraries into the wheels
14+
for whl in wheelhouse/*.whl; do
15+
auditwheel repair $whl -w /io/wheelhouse/
16+
done
17+
18+
# Install packages and test
19+
for PYBIN in /opt/python/*/bin/; do
20+
${PYBIN}/pip install bencoder.pyx --no-index -f /io/wheelhouse
21+
${PYBIN}/nosetests /io/
22+
done

0 commit comments

Comments
 (0)