author Simon Chabot <>
Wed, 13 Feb 2019 19:10:43 +0100
changeset 860 abda658fe2ae
parent 818 7f89d2d976e7
child 868 3ee87bec4482
permissions -rwxr-xr-x
autopep8: F841 undefined name Special cases: - `long` and `unicode` no longer exist in python 3. I added a "# noqa" comment to avoid warnings. - `cmp` method no longer exist in python 3. It was used in the `test/` file in the __cmp__ method. It appears that when this method is removed, all the tests are still valid. Therefore I dropped it.


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

mkdir -p /wheelhouse
# Compile wheels
for PYBIN in /opt/python/*/bin; 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 /opt/python/*/bin/; do
    "${PYBIN}/pip" install pytest
    "${PYBIN}/pip" install rql --no-index -f /wheelhouse
    "${PYBIN}/python" -c 'import sys; assert sys.version_info[:2] == (2, 7)' && "${PYBIN}/pip" install unittest2
    echo "************  test on $PYBIN"
    (cd "/mnt/host"; "${PYBIN}/py.test" rql)
mv /wheelhouse/rql*manylinux*.whl /mnt/host/rql/dist/