Andrey,

On Tuesday, October 29, 2024 10:47:47 PM MST Andrey Rakhmatullin wrote:
> On Tue, Oct 29, 2024 at 01:43:50PM -0700, Soren Stoutner wrote:
> > 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’
> 
> The same happens when I install the package manually and try that import.
> 
> > 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
> 
> Why would this fix this problem?
> 
> > My question is, what is the canonical way to handle this?
> 
> Fixing the package so that it provides that module or patching the tests
> so that they don't require it.

The tests run successfully during build.

"688 passed, 3 skipped, 3 warnings in 98.99s (0:01:38)”

https://salsa.debian.org/cryptocoin-team/electrum/-/jobs/6505007#L1548

However, I should note that there are a significant number of warnings that 
various 
modules are importable packages but missing from setuptools' `packages` 
configuration.

It is very possible that I am missing some important plumbing in the packaging 
to expose 
these properly, as I am fairly new to using Python tests or Python at all (my 
programming 
background is in other languages).  I would imagine upstream only runs these 
tests at 
build time, so the upstream developers might not have included the plumbing for 
them to 
be imported in other environments.  My previous understanding was that 
"Testsuite: 
autopkgtest-pkg-pybuild” was designed to automatically run build tests in the 
autopkgtest 
environment, but perhaps in this case the tests are not compatible with 
autopkgtest.  If so, 
is the best way to handle it to simply not use autopkgtest?  Or is there some 
massaging of 
the packaging I can do that will make them compatible?

-- 
Soren Stoutner
so...@debian.org

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to