author Jérémy Bobbio <>
Tue, 04 Jun 2019 11:53:03 +0200
changeset 862 942ef0731f4c
parent 818 7f89d2d976e7
child 868 3ee87bec4482
permissions -rwxr-xr-x
Update Debian packaging Various improvements to Debian packaging: - Depend on python-yapps and python3-yapps for YAPPS runtime. - Use PYBUILD_NAME instead of debian/*.install files. - Use python3-sphinx instead of obsolete Python 2 version. - Always build Python 3 package. - Run tests at build time and adds relevant packages to Build-Depends. - Add superficial autopkgtest using autodep8. - Add autopkgtest script to run unittest against installed packages. - Add Vcs-Hg and Vcs-Browser fields. - Update Standards-Version to 4.3.0. In order to run the tests at build time and with autopkgtest, they need to be made part of the Python source package. The manifest has been modified accordingly.


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/