author Philippe Pepiot <>
Wed, 06 Nov 2019 11:27:36 +0100
changeset 868 3ee87bec4482
parent 818 7f89d2d976e7
child 885 6db0f3b97ff8
permissions -rwxr-xr-x
Stop building python2 wheels and workaround broken py38 wheel This script is used to publish wheel binary packages to pypi. Since we're going to remove python2 support, stop generating wheels for python2. Also py38 is out and our wheel doesn't compile with py38 due to a bug of logilab-common. Waiting a fix, don't build wheel for py38. % docker run --rm -it ls -1A /opt/python cp27-cp27m cp27-cp27mu cp34-cp34m cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38


set -ex

mkdir -p dist
if ! test -e /.dockerenv; then
  exec docker run --rm -it -v $(pwd):/mnt/host/rql sh /mnt/host/rql/$0

cd /mnt/host
curl -L$VERSION.tar.gz | tar -xzf -
cd gecode-release-$VERSION
make -j2
make install

PYBINS="/opt/python/cp34*/bin /opt/python/cp35*/bin /opt/python/cp36*/bin /opt/python/cp37*/bin"

mkdir -p /wheelhouse
# Compile wheels
for PYBIN in $PYBINS; do
    "${PYBIN}/pip" wheel /mnt/host/rql -w /wheelhouse

# Bundle external shared libraries into the wheels
for whl in /wheelhouse/rql*.whl; do
    auditwheel repair "$whl" -w /wheelhouse

# Install packages and test
for PYBIN in $PYBINS; do
    "${PYBIN}/pip" install pytest
    "${PYBIN}/pip" install rql --no-index -f /wheelhouse
    echo "************  test on $PYBIN"
    (cd "/mnt/host"; "${PYBIN}/py.test" rql)
mv /wheelhouse/rql*manylinux*.whl /mnt/host/rql/dist/