Skip to content

Commit

Permalink
Travis auto build: take #1
Browse files Browse the repository at this point in the history
  • Loading branch information
sunu committed May 3, 2018
1 parent 04d978c commit 036e27e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
matrix:
include:
- sudo: required
services:
- docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64

install:
- docker pull $DOCKER_IMAGE

script:
- docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/build-wheels/manylinux.sh
- ls wheelhouse/
13 changes: 8 additions & 5 deletions build-wheels/manylinux.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e -x

cd /pdflib/
cd /io/

# Upgrade cmake
wget http://www.cmake.org/files/v3.2/cmake-3.2.0.tar.gz --no-check-certificate
Expand All @@ -20,11 +20,12 @@ git clone --branch poppler-0.63.0 --depth 1 https://anongit.freedesktop.org/git/
cd poppler_src/
cmake -DENABLE_SPLASH=OFF -DENABLE_UTILS=OFF -DENABLE_LIBOPENJPEG=none .
make
export POPPLER_ROOT=/pdflib/poppler_src/
export POPPLER_ROOT=/io/poppler_src/
cd ..

# Set shared library paths
export LD_LIBRARY_PATH="/pdflib/poppler_src/:/pdflib/poppler_src/cpp/:/usr/lib64/"
export LD_LIBRARY_PATH="/io/poppler_src/:/io/poppler_src/cpp/:/usr/lib64/"


# install twine
/opt/python/cp27-cp27m/bin/pip install twine
Expand All @@ -33,7 +34,7 @@ export TWINE=/opt/python/cp27-cp27m/bin/twine
# Compile wheels
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/pip" install cython
"${PYBIN}/pip" wheel /pdflib/ -w wheelhouse/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
done

# Bundle external shared libraries into the wheels
Expand All @@ -44,5 +45,7 @@ done
# Install packages and test
for PYBIN in /opt/python/*/bin/; do
"${PYBIN}/pip" install pdflib --no-index -f wheelhouse/
(cd "$HOME"; "${PYBIN}/python" -c "import pdflib")
(cd /io/; "${PYBIN}/python" -c "import pdflib")
"${PYBIN}/pip" install pytest
"${PYBIN}/pytest"
done

0 comments on commit 036e27e

Please sign in to comment.