From e5921252ea22d35a76ed3f8da9442cc0e3cd6c54 Mon Sep 17 00:00:00 2001 From: Thomas Ferreira de Lima Date: Sun, 21 Oct 2018 14:40:32 -0400 Subject: [PATCH] prototype formula for manylinux1 --- ci-scripts/manylinux-docker.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ci-scripts/manylinux-docker.sh diff --git a/ci-scripts/manylinux-docker.sh b/ci-scripts/manylinux-docker.sh new file mode 100644 index 000000000..4e9f6a694 --- /dev/null +++ b/ci-scripts/manylinux-docker.sh @@ -0,0 +1,31 @@ +#!/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 +ln -s /usr/bin/ccache /usr/lib64/ccachec++ +ln -s /usr/bin/ccache /usr/lib64/ccachecc +ln -s /usr/bin/ccache /usr/lib64/ccachegcc +ln -s /usr/bin/ccache /usr/lib64/ccacheg++ +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 + "${PYBIN}" -m unittest /io/testdata/pymod/import_db.py testdata/pymod/import_rdb.py testdata/pymod/import_tl.py +done