From dae31f68dc40259c9e752fb026774787cf1ceba0 Mon Sep 17 00:00:00 2001 From: Hans van Kranenburg Date: Wed, 29 Jul 2020 13:27:24 +0200 Subject: [PATCH] debian/{rules,control}: switch to python 3 Debian Bullseye is going to release without python 2. Signed-off-by: Hans van Kranenburg --- debian/control | 6 +++--- debian/rules | 14 +++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/debian/control b/debian/control index 8b47b14b15..fda6a9bea9 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Build-Depends: rdfind, lsb-release, flex, bison, - python-dev, + python3-dev, dh-python, bcc [i386 amd64], gcc-multilib [i386 amd64], @@ -62,7 +62,7 @@ Package: xen-utils-common Section: admin Architecture: amd64 i386 armhf arm64 Depends: lsb-base, udev, xenstore-utils, - ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} + ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends} Suggests: xen-doc Description: Xen administrative tools - common files The userspace tools to manage a system virtualized through the Xen virtual @@ -100,7 +100,7 @@ Package: xen-utils-4.14 Section: admin Architecture: amd64 arm64 armhf i386 Provides: xen-utils -Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, xen-utils-common (>= ${source:Version}) +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, xen-utils-common (>= ${source:Version}) Recommends: bridge-utils, libc6-xen [i386], xen-hypervisor-4.14, qemu-system-x86, grub-xen-host [i386 amd64] Suggests: qemu-utils [i386 amd64], seabios [i386 amd64], ovmf Description: XEN administrative tools diff --git a/debian/rules b/debian/rules index 1ec0fdfbce..6d0a0568b8 100755 --- a/debian/rules +++ b/debian/rules @@ -146,8 +146,12 @@ make_args_tools= $(make_args_common) \ EXTRA_CFLAGS_XEN_TOOLS='$(dpkg_CFLAGS) $(dpkg_CPPFLAGS)' \ PREPEND_LDFLAGS_XEN_TOOLS='$(dpkg_LDFLAGS)' +export PYBUILD_NAME=xen +export PYBUILD_DISABLE=test +export PYBUILD_SYSTEM=distutils + %: - dh $@ --with=python2 + dh $@ --with=python3 --buildsystem=pybuild # Without this, something on stretch passes CFLAGS in the environment # to the Xen build system, which then (with 4.11) chokes printing @@ -272,11 +276,11 @@ override_dh_install: : debian/installsharedlibs -# dh_python2 does not know to look in the funny directory where +# dh_python3 does not know to look in the funny directory where # we put the versioned /usr/lib files including some python scripts. -override_dh_python2: - dh_python2 - dh_python2 -pxen-utils-$(upstream_version) \ +override_dh_python3: + dh_python3 + dh_python3 -pxen-utils-$(upstream_version) \ usr/lib/xen-$(upstream_version)/bin # We have two init scripts. (There used to be xend too.) -- 2.30.2