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.
--- a/MANIFEST.in Fri Feb 15 15:46:02 2019 +0100
+++ b/MANIFEST.in Tue Jun 04 11:53:03 2019 +0200
@@ -17,3 +17,6 @@
include data/gecode_version.cc
recursive-include tools *.py *.rql
+
+include tox.ini
+recursive-include test *.py
--- a/debian/changelog Fri Feb 15 15:46:02 2019 +0100
+++ b/debian/changelog Tue Jun 04 11:53:03 2019 +0200
@@ -1,3 +1,22 @@
+rql (0.35.1-1) UNRELEASED; urgency=medium
+
+ [ Denis Laxalde ]
+ * New upstream release.
+
+ [ Jérémy Bobbio ]
+ * Update 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.
+
+ -- Jérémy Bobbio <jeremy.bobbio@irq7.fr> Tue, 04 Jun 2019 10:50:33 +0200
+
rql (0.35.0-1) unstable; urgency=medium
* new upstream release
--- a/debian/control Fri Feb 15 15:46:02 2019 +0100
+++ b/debian/control Tue Jun 04 11:53:03 2019 +0200
@@ -5,18 +5,28 @@
Uploaders: Sylvain Thenault <sylvain.thenault@logilab.fr>, Nicolas Chauvat <nicolas.chauvat@logilab.fr>
Build-Depends:
debhelper (>= 9),
- python-all-dev (>= 2.6.5),
- python3-all-dev (>= 2.6.5),
+ dh-python,
+ python-all-dev,
+ python3-all-dev,
+ python-pytest,
+ python3-pytest,
+ python-unittest2,
+ python-logilab-common,
+ python3-logilab-common,
+ python-logilab-database,
+ python3-logilab-database,
libgecode-dev,
- python-sphinx,
+ python3-sphinx,
python-setuptools,
python3-setuptools,
python-six,
- python3-six,
- dh-python,
-X-Python-Version: >= 2.6
-X-Python3-Version: >= 3.3
-Standards-Version: 3.9.6
+ python3-six
+X-Python-Version: >= 2.7
+X-Python3-Version: >= 3.4
+Standards-Version: 4.3.0
+Testsuite: autopkgtest-pkg-python
+Vcs-Hg: https://hg.logilab.org/master/rql
+Vcs-Browser: https://hg.logilab.org/master/rql
Homepage: http://www.logilab.org/project/rql
Package: python-rql
@@ -26,7 +36,7 @@
${misc:Depends},
${shlibs:Depends},
python-logilab-common (>= 0.35.3-1),
- yapps2-runtime,
+ python-yapps,
python-logilab-database (>= 1.6.0),
python-logilab-constraint,
python-six (>= 1.4.0),
@@ -46,7 +56,7 @@
${misc:Depends},
${shlibs:Depends},
python3-logilab-common,
- python3-yapps2-runtime,
+ python3-yapps,
python3-logilab-database (>= 1.6.0),
python3-logilab-constraint,
python3-six (>= 1.4.0),
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/pybuild.testfiles Tue Jun 04 11:53:03 2019 +0200
@@ -0,0 +1,3 @@
+test
+tox.ini
+rql.egg-info
--- a/debian/python-rql.install Fri Feb 15 15:46:02 2019 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-usr/lib/python2*
--- a/debian/python3-rql.install Fri Feb 15 15:46:02 2019 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-usr/lib/python3*
--- a/debian/rules Fri Feb 15 15:46:02 2019 +0100
+++ b/debian/rules Tue Jun 04 11:53:03 2019 +0200
@@ -1,13 +1,13 @@
#!/usr/bin/make -f
-export RQL_FORCE_GECODE=1
+export PYBUILD_NAME = rql
+export PYBUILD_OPTION = --test-pytest
-ifeq (,$(shell py3versions -r 2>/dev/null))
- py3k = -Npython3-rql
-endif
+# Always build C extension
+export RQL_FORCE_GECODE = 1
%:
- dh $@ --with python2,python3 --buildsystem pybuild $(py3k)
+ dh $@ --with python2,python3 --buildsystem pybuild
override_dh_auto_build:
dh_auto_build
@@ -16,14 +16,3 @@
override_dh_auto_clean:
dh_auto_clean
$(MAKE) -C doc clean
-
-override_dh_auto_test:
- # nothing
-
-# prevent dh_python2 from generating bogus deps on python-yapps (nonexistent)
-# or python-logilab-constraint (unnecessary with gecode)
-override_dh_python2:
- dh_python2 --no-guessing-deps
-
-override_dh_python3:
- dh_python3 --no-guessing-deps
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/source/format Tue Jun 04 11:53:03 2019 +0200
@@ -0,0 +1,1 @@
+3.0 (quilt)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/source/options Tue Jun 04 11:53:03 2019 +0200
@@ -0,0 +1,1 @@
+extend-diff-ignore = "^(.hg(/|ignore$|tags$)|[^/]*\.spec$|build_wheel\.sh)"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/tests/control Tue Jun 04 11:53:03 2019 +0200
@@ -0,0 +1,4 @@
+Tests: unittest
+Depends:
+ @, @builddeps@,
+Restrictions: allow-stderr
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/tests/unittest Tue Jun 04 11:53:03 2019 +0200
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+set -x
+
+### Setup tests
+
+cp -r test tox.ini "$AUTOPKGTEST_TMP"
+
+### Run tests
+
+for py in $(pyversions -r 2>/dev/null) $(py3versions -r 2>/dev/null); do
+ echo "Testing with $py:"
+ (cd "$AUTOPKGTEST_TMP" && $py -m pytest test)
+done