[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.
#!/usr/bin/make -f# Sample debian/rules that uses debhelper.# GNU copyright 1997 to 1999 by Joey Hess.# Uncomment this to turn on verbose mode.# export DH_VERBOSE=1export PYBUILD_NAME=cubicwebexport PYBUILD_DISABLE_python3=test%: dh $@ --with python3,sphinxdoc --buildsystem=pybuildoverride_dh_auto_build: export http_proxy=127.0.0.1:9override_dh_auto_build: export https_proxy=127.0.0.1:9override_dh_auto_build: dh_auto_buildifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. sphinx-build -N -bhtml doc/ debian/cubicweb-doc/htmlendifoverride_dh_auto_install: dh_auto_install mv debian/python3-${PYBUILD_NAME}/usr/bin/cubicweb-ctl \ debian/cubicweb-ctl/usr/bin/cubicweb-ctloverride_dh_installchangelogs: dh_installchangelogs -Xdoc/changes# Should extra sections in requires.txt go to Recommends, Suggests or be# ignored?## All sections must be listed so we don't forget any in cases of future# changes.RECOMMENDS_SECTIONS = ext crypto ical pyramid rdfSUGGESTS_SECTIONS = captcha zmq# sparql currently requires fyzz which is not compatible with Python 3IGNORED_SECTIONS = sparqloverride_dh_python3: @set -e && trap 'rm -f requires-sections debian-sections' EXIT && \ sed -n -e 's/\[\(.*\)\]/\1/p' cubicweb.egg-info/requires.txt | sort > requires-sections && \ printf "%s\n" $(RECOMMENDS_SECTIONS) $(SUGGESTS_SECTIONS) $(IGNORED_SECTIONS) | sort > debian-sections && \ FORGOTTEN_SECTIONS=$$(comm -23 requires-sections debian-sections) && \ if [ "$$FORGOTTEN_SECTIONS" ]; then \ echo "The following sections are not listed in debian/rules:" && \ echo "$$FORGOTTEN_SECTIONS" && \ echo "Please add them in either RECOMMENDS_SECTIONS, SUGGESTS_SECTIONS or IGNORED_SECTIONS" && \ exit 1; \ fi dh_python3 \ $(foreach section,$(RECOMMENDS_SECTIONS),--recommends-section=$(section)) \ $(foreach section,$(SUGGESTS_SECTIONS),--suggests-section=$(section))