[PATCH 1 of 2 logilab-database] Update packaging for buster and use current best practices

Jérémy Bobbio jeremy.bobbio at irq7.fr
Tue Jun 4 18:47:03 CEST 2019


# HG changeset patch
# User Jérémy Bobbio <jeremy.bobbio at irq7.fr>
# Date 1559586449 -7200
#      Mon Jun 03 20:27:29 2019 +0200
# Node ID 9f4d9b51e41c74db2d635d6eae67855836c3e6b2
# Parent  e364231a4ee5f45764f41f72b04b4bf4105646a7
Update packaging for buster and use current best practices

We clean up most of debian/rules by using dh-python properly.

Tests are best skipped at build time because they require running
database to be meaningful. They will be implemented using autopkgtest.

diff -r e364231a4ee5 -r 9f4d9b51e41c debian/changelog
--- a/debian/changelog	Tue May 28 15:28:10 2019 +0200
+++ b/debian/changelog	Mon Jun 03 20:27:29 2019 +0200
@@ -1,3 +1,19 @@
+logilab-database (1.17.0-2) UNRELEASED; urgency=medium
+
+  * Update packaging for buster and use current best practices:
+    - Use 3.0 (quilt) source format.
+    - Use dh-python and pybuild.
+    - Use PYBUILD_NAME instead of debian/*.install files.
+    - Always build Python 3 package.
+    - Fix debian/pydist-overrides and use debian/py3dist-overrides
+      to map Yapps2 to proper dependencies.
+    - Add Vcs-Hg and Vcs-Browser fields.
+    - Update Standards-Version to 4.3.0.
+  * Disable running tests at build time: they require running databases
+    to be meaningful.
+
+ -- Jérémy Bobbio <jeremy.bobbio at irq7.fr>  Wed, 29 May 2019 16:24:07 +0200
+
 logilab-database (1.17.0-1) unstable; urgency=medium
 
   * New upstream release.
diff -r e364231a4ee5 -r 9f4d9b51e41c debian/control
--- a/debian/control	Tue May 28 15:28:10 2019 +0200
+++ b/debian/control	Mon Jun 03 20:27:29 2019 +0200
@@ -4,16 +4,25 @@
 Maintainer: Logilab SA <contact at logilab.fr>
 Build-Depends:
  debhelper (>= 9),
- python-all (>= 2.6.5),
+ dh-python,
+ python-all,
  python3-all,
  python-setuptools,
  python3-setuptools,
- yapps2-runtime,
- python3-yapps2-runtime | python3 (<< 3.3),
+ python-yapps,
+ python3-yapps,
+ python-six,
+ python3-six,
+ python-logilab-common,
+ python3-logilab-common,
+ python-psycopg2,
+ python3-psycopg2
 Build-Depends-Indep: python-epydoc, graphviz
-X-Python-Version: >= 2.6
-X-Python3-Version: >= 3.3
-Standards-Version: 3.9.6
+X-Python-Version: >= 2.7
+X-Python3-Version: >= 3.4
+Standards-Version: 4.3.0
+Vcs-Hg: https://hg.logilab.org/master/logilab/database
+Vcs-Browser: https://hg.logilab.org/master/logilab/database
 Homepage: http://www.logilab.org/project/logilab-database
 
 Package: python-logilab-database
diff -r e364231a4ee5 -r 9f4d9b51e41c debian/py3dist-overrides
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/py3dist-overrides	Mon Jun 03 20:27:29 2019 +0200
@@ -0,0 +1,1 @@
+Yapps2 python3-yapps
diff -r e364231a4ee5 -r 9f4d9b51e41c debian/pydist-overrides
--- a/debian/pydist-overrides	Tue May 28 15:28:10 2019 +0200
+++ b/debian/pydist-overrides	Mon Jun 03 20:27:29 2019 +0200
@@ -1,1 +1,1 @@
-Yapps2 -2.8 yapps2-runtime
+Yapps2 python-yapps
diff -r e364231a4ee5 -r 9f4d9b51e41c debian/python-logilab-database.install
--- a/debian/python-logilab-database.install	Tue May 28 15:28:10 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-usr/lib/python2*
diff -r e364231a4ee5 -r 9f4d9b51e41c debian/python3-logilab-database.install
--- a/debian/python3-logilab-database.install	Tue May 28 15:28:10 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-usr/lib/python3*
diff -r e364231a4ee5 -r 9f4d9b51e41c debian/rules
--- a/debian/rules	Tue May 28 15:28:10 2019 +0200
+++ b/debian/rules	Mon Jun 03 20:27:29 2019 +0200
@@ -1,28 +1,7 @@
 #!/usr/bin/make -f
 
-include /usr/share/python/python.mk
-
-# don't build the python3 package if python3 is < 3.3
-py3k = $(subst python3.,,$(shell py3versions -d))
-build_py3k = $(shell test "$(py3k)" -gt 2 && echo 1)
-
-ifeq (,$(build_py3k))
-    DH_OPTIONS += -Npython3-logilab-database
-    export DH_OPTIONS
-endif
+export PYBUILD_NAME = logilab-database
+export PYBUILD_DISABLE = test
 
 %:
-	dh $@ --with python2,python3
-
-install-python%:
-	python$* setup.py -q install --no-compile --root=$(CURDIR)/debian/tmp \
-	    $(py_setup_install_args)
-
-override_dh_auto_install: $(patsubst %,install-%,$(shell py3versions -r))
-	dh_auto_install
-	rm -f debian/tmp/usr/lib/python*/*/logilab/__init__.py
-
-override_dh_clean:
-	dh_clean
-	rm -rf logilab_database.egg-info
-	rm -rf build
+	dh $@ --with python2,python3 --buildsystem=pybuild
diff -r e364231a4ee5 -r 9f4d9b51e41c debian/source/format
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/source/format	Mon Jun 03 20:27:29 2019 +0200
@@ -0,0 +1,1 @@
+3.0 (quilt)
diff -r e364231a4ee5 -r 9f4d9b51e41c debian/source/options
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/source/options	Mon Jun 03 20:27:29 2019 +0200
@@ -0,0 +1,1 @@
+extend-diff-ignore = "^(.hg(/|ignore$|tags$)|[^/]*\.spec$|tox.ini$|test/)"


More information about the cubicweb-devel mailing list