Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #16413

Re: electrum: How to enable autopkgtest?

From Andrey Rakhmatullin <wrar@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: electrum: How to enable autopkgtest?
Date 2024-10-30 07:50 +0100
Message-ID <JDaGJ-5hG4-1@gated-at.bofh.it> (permalink)
References <JD1k5-5axK-13@gated-at.bofh.it> <JD9KF-5gSM-3@gated-at.bofh.it> <JDadH-5hq5-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Oct 29, 2024 at 11:11:44PM -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.

Sure, as that module is present in the package source.

The purpose of autopkgtests is to test the installed package. Your package
fails those tests because those tests expect certain modules to be
installed while they are not. Only you can know whether those modules not
being installed is a bug or not, and depending on that there are two ways
to solve the autopkgtests failure. And it looks like you definitely know
the answer, as it was you who added the code that explicitly removes those
modules from the package.

> 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,

No, this is irrelevant, as all modules are installed by the upstream
build system.

> 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.  

No.

-- 
WBR, wRAR

Back to linux.debian.maint.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

electrum: How to enable autopkgtest? Soren Stoutner <soren@debian.org> - 2024-10-29 21:50 +0100
  Re: electrum: How to enable autopkgtest? Andrey Rakhmatullin <wrar@debian.org> - 2024-10-30 06:50 +0100
    Re: electrum: How to enable autopkgtest? Soren Stoutner <soren@debian.org> - 2024-10-30 07:20 +0100
      Re: electrum: How to enable autopkgtest? Andrey Rakhmatullin <wrar@debian.org> - 2024-10-30 07:50 +0100
      Re: electrum: How to enable autopkgtest? Soren Stoutner <soren@debian.org> - 2024-10-30 08:10 +0100
        Re: electrum: How to enable autopkgtest? Andrey Rakhmatullin <wrar@debian.org> - 2024-10-30 08:20 +0100
          Re: electrum: How to enable autopkgtest? Soren Stoutner <soren@debian.org> - 2024-10-30 08:30 +0100
            Re: electrum: How to enable autopkgtest? Andrey Rakhmatullin <wrar@debian.org> - 2024-10-30 08:40 +0100
              Re: electrum: How to enable autopkgtest? Soren Stoutner <soren@debian.org> - 2024-10-31 20:50 +0100
                Re: electrum: How to enable autopkgtest? weepingclown <weepingclown@disroot.org> - 2024-10-31 21:40 +0100
                Re: electrum: How to enable autopkgtest? Soren Stoutner <soren@debian.org> - 2024-10-31 21:50 +0100
                Re: electrum: How to enable autopkgtest? weepingclown <weepingclown@disroot.org> - 2024-10-31 21:50 +0100
                Re: electrum: How to enable autopkgtest? Soren Stoutner <soren@debian.org> - 2024-10-31 22:10 +0100
        Re: electrum: How to enable autopkgtest? Hefee <hefee@debian.org> - 2024-10-31 19:50 +0100
          Re: electrum: How to enable autopkgtest? Soren Stoutner <soren@debian.org> - 2024-10-31 20:30 +0100
  Re: electrum: How to enable autopkgtest? Antonio Terceiro <terceiro@debian.org> - 2024-10-30 14:10 +0100

csiph-web