2018-10-21 20:40:32 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
# run with docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/ci-scripts/manylinux-docker.sh
|
|
|
|
|
# see https://github.com/pypa/python-manylinux-demo/blob/master/.travis.yml
|
|
|
|
|
# cache using https://github.com/travis-ci/travis-ci/issues/5358
|
|
|
|
|
set -e -x
|
|
|
|
|
|
|
|
|
|
# Install a system package required by our library
|
|
|
|
|
yum install -y zlib-devel
|
|
|
|
|
yum install -y ccache
|
2018-12-18 18:11:26 +01:00
|
|
|
ln -s /usr/bin/ccache /usr/lib64/ccache/c++
|
|
|
|
|
ln -s /usr/bin/ccache /usr/lib64/ccache/cc
|
|
|
|
|
ln -s /usr/bin/ccache /usr/lib64/ccache/gcc
|
|
|
|
|
ln -s /usr/bin/ccache /usr/lib64/ccache/g++
|
2018-10-21 20:40:32 +02:00
|
|
|
export PATH=/usr/lib64/ccache:$PATH
|
|
|
|
|
|
|
|
|
|
# Compile wheels
|
|
|
|
|
for PYBIN in /opt/python/*/bin; do
|
|
|
|
|
cd /io; mkdir -p /io/wheelhouse
|
|
|
|
|
"${PYBIN}/python" setup.py bdist_wheel -d 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 klayout --no-index -f /io/wheelhouse
|
2018-12-18 18:11:26 +01:00
|
|
|
"${PYBIN}/python" -m unittest testdata/pymod/import_db.py testdata/pymod/import_rdb.py testdata/pymod/import_tl.py
|
2018-10-21 20:40:32 +02:00
|
|
|
done
|