debian/{rules,control}: switch to python 3
authorHans van Kranenburg <hans@knorrie.org>
Wed, 29 Jul 2020 11:27:24 +0000 (13:27 +0200)
committerHans van Kranenburg <hans@knorrie.org>
Sat, 5 Sep 2020 19:05:21 +0000 (21:05 +0200)
Debian Bullseye is going to release without python 2.

Signed-off-by: Hans van Kranenburg <hans@knorrie.org>
debian/control
debian/rules

index 8b47b14b1510f0198cf0247aaca734ae6e7c72cb..fda6a9bea98bd9ca7a71db77c584403da1729261 100644 (file)
@@ -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
index 1ec0fdfbced10e772f66da9faad2fea32a22739f..6d0a0568b8dd820be01d31b425352cb8a8d6be1c 100755 (executable)
@@ -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.)