On Tue, Oct 29, 2024 at 01:43:50PM -0700, Soren Stoutner wrote:
> I recently requested the upstream maintainers add the tests directory to 
> their 
> signed tarball releases.  I am now in the process of trying to enable those 
> tests in the Debian package.
> 
> I added a Build-Depend on "python3-pytest <!nocheck>” and added “Testsuite: 
> autopkgtest-pkg-pybuild” to debian/control.  This enables the tests during 
> build time, but I receive the following error during autopkgtest:
> 
> E   ModuleNotFoundError: No module named ‘electrum.gui.qml’
> 
> https://salsa.debian.org/cryptocoin-team/electrum/-/jobs/6505015#L677
> 
> I believe I could fix this problem by adding the following to debian/rules:
> 
> export PYBUILD_NAME=electrum
> 
> However, this breaks the current splitting of the files into two binary 
> packages, electrum and python3-electrum, using .install files.
> 
> My question is, what is the canonical way to handle this?  Is there some 
> variation of the “export PYBUILD_NAME” command that preserves the contents of 
> the two binary packages?  Or, is there some other command I am missing that 
> will allow autopkgtest to import the built modules?

If you check the artfifacts in the pipeline, your python3-electron does
not contain the module that the test is trying to import:

$ dpkg --contents python3-electrum_4.5.8+ds-1+salsaci+20241029+49_all.deb | 
grep qml.*py
-rw-r--r-- root/root      4142 2024-10-18 00:56 
./usr/lib/python3/dist-packages/electrum/plugins/labels/qml.py
-rw-r--r-- root/root      4559 2024-10-18 00:56 
./usr/lib/python3/dist-packages/electrum/plugins/trustedcoin/qml.py

This is why the import fails, it has nothing to do with PYBUILD_NAME.

Attachment: signature.asc
Description: PGP signature

Reply via email to