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
|
2018-12-18 21:18:33 +01:00
|
|
|
"${PYBIN}/python" setup.py bdist_wheel -d /persist/wheelhouse/
|
2018-10-21 20:40:32 +02:00
|
|
|
done
|
|
|
|
|
|
2018-12-18 21:18:33 +01:00
|
|
|
# Bundle external shared libraries into the wheels via auditwheel
|
|
|
|
|
for whl in /persist/wheelhouse/*linux_x86_64.whl; do
|
|
|
|
|
auditwheel repair "$whl" -w /persist/wheelhouse/
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Fix each wheel generated by auditwheel
|
|
|
|
|
for whl in /persist/wheelhouse/*manylinux1_x86_64.whl; do
|
|
|
|
|
./ci-scripts/docker/fix_wheel.sh "$whl"
|
2018-10-21 20:40:32 +02:00
|
|
|
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
|