Tested wheel build for all manylinux python versions

This commit is contained in:
Thomas Ferreira de Lima 2018-12-18 15:18:33 -05:00
parent 937019e651
commit f8502adb32
No known key found for this signature in database
GPG Key ID: 43E98870EAA0A86E
2 changed files with 34 additions and 6 deletions

View File

@ -45,7 +45,7 @@ $ docker volume inspect klayout-persist
Build image `myimage` with:
```bash
$ docker build -t myimage:latest .
$ docker build -t myimage:latest -f Dockerfile.x86_64 .
```
This creates an image called `myimage` (temporary). This image will not overwrite old ones. Tip: prune old, unused images with `docker image prune`.
@ -99,3 +99,27 @@ cd /persist/klayout
/opt/python/cp36-cp36m/bin/python -m unittest testdata/pymod/import_db.py testdata/pymod/import_rdb.py testdata/pymod/import_tl.py
# Tests passed!
```
Encoded this behavior in a script called fix_wheel.sh. now you only need to run `./fix_wheel.sh wheelhouse/klayout-0.26.0.dev8-cp36-cp36m-manylinux1_x86_64.whl`, and it will overwrite the wheel.
# Step 5. Iterate over all python versions.
For that, we need something like:
```bash
# Compile wheels
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/python" setup.py bdist_wheel -d /persist/wheelhouse/
done
# 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"
done
```

View File

@ -15,13 +15,17 @@ 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/
"${PYBIN}/python" setup.py bdist_wheel -d /persist/wheelhouse/
done
# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
auditwheel repair "$whl" -w /io/wheelhouse/
# 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"
done
# Install packages and test