[skeleton] Update Debian packaging template
Here are multiple updates to the Debian packaging template provided when
running `cubicweb-ctl newcube`:
* Switch to source format 3.0 (quilt).
* Switch to debhelper 9.
* Switch to dh-python.
* Switch to Python 3.
* Name the binary package `python3-cubicweb-CUBENAME` instead of
just `cubicweb-CUBENAME` (which is still the source package).
* Populate Depends using dh_python3 support for Python requirements.
* Run test suite at build time using pytest.
* Add autopkgtest to run test suite against the installed package.
* Bump Standards-Version to 4.3.0.
#!/bin/sh
set -e
set -x
### Setup tests
# Uncomment if tests require database access
#service postgresql restart || service postgresql start
#trap 'service postgresql stop' EXIT
cp -r test tox.ini "$AUTOPKGTEST_TMP"
chown -R nobody:nogroup "$AUTOPKGTEST_TMP"
### Run tests
for py in $(py3versions -r 2>/dev/null); do
cd "$AUTOPKGTEST_TMP"
echo "Testing with $py:"
su nobody --shell /bin/sh \
-c "$py -m pytest -v"
done