hi,
On Mon, Mar 25, 2024 at 11:28:33PM +0100, Matthias Klose wrote:
> Don't hard-code the python version in d/control, it will fail with 3.12
>
> patch at
> http://launchpadlibrarian.net/721153415/virtnbdbackup_2.0-1build1_2.0-1ubuntu1.diff.gz
thanks, but not hardcoding the python version makes build fail in dh_auto_test
for me (using git-builpackage and debspawn as builder). For some reason yet
unclear to me dh_auto_test attempts to run some made up testcases ..
before:
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:305: cd
> /srv/build/virtnbdbackup-2.4/.pybuild/cpython3_3.11_virtnbdbackup/build;
> python3.11 -m unittest discover -v
>
> ----------------------------------------------------------------------
> Ran 0 tests in 0.000s
with change:
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:305: cd
> /srv/build/virtnbdbackup-2.4/.pybuild/cpython3_3.12_virtnbdbackup/build;
> python3.12 -m unittest discover -v
> libvirtnbdbackup.extenthandler
> (unittest.loader._FailedTest.libvirtnbdbackup.extenthandler) ... ERROR
> libvirtnbdbackup.nbdcli
> (unittest.loader._FailedTest.libvirtnbdbackup.nbdcli) ... ERROR
>
> ======================================================================
> ERROR: libvirtnbdbackup.extenthandler
> (unittest.loader._FailedTest.libvirtnbdbackup.extenthandler)
> ----------------------------------------------------------------------
> ImportError: Failed to import test module: libvirtnbdbackup.extenthandler
> Traceback (most recent call last):
> File "/usr/lib/python3.12/unittest/loader.py", line 427, in _find_test_path
> package = self._get_module_from_name(name)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.12/unittest/loader.py", line 337, in
> _get_module_from_name
> __import__(name)
> File
> "/srv/build/virtnbdbackup-2.4/.pybuild/cpython3_3.12_virtnbdbackup/build/libvirtnbdbackup/extenthandler/__init__.py",
> line 21, in <module>
> from .extenthandler import ExtentHandler
> File
> "/srv/build/virtnbdbackup-2.4/.pybuild/cpython3_3.12_virtnbdbackup/build/libvirtnbdbackup/extenthandler/extenthandler.py",
> line 19, in <module>
> from nbd import CONTEXT_BASE_ALLOCATION
> File "/usr/lib/python3/dist-packages/nbd.py", line 34, in <module>
> import libnbdmod
> ModuleNotFoundError: No module named 'libnbdmod'
of course i could skip dh_auto_test but i still wonder what
happens here..
bye,
- michael