electrum: How to enable autopkgtest?

2024-10-29 Thread Soren Stoutner
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 ” 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?

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

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


Re: Request to join the Debian Python Team

2024-10-29 Thread Louis-Philippe Véronneau

On 2024-10-27 12 h 19 p.m., 陈 晟祺 wrote:

Hi all,

I would like to join the Debian Python Team on salsa. My username is @harry.

I am currently a DM and have been maintaining several packages[1].
I would like to maintain some new packages along with the team, like virtualbmc 
(#1086153).
I have read have read the Debian Python Team Policy [2] and accept it.


[1]: https://qa.debian.org/developer.php?login=harry-c...@outlook.com
[2]: 
https://salsa.debian.org/python-team/tools/python-modules/blob/master/policy.rst

Thanks,
Shengqi Chen



Welcome to the team.

--
  ⢀⣴⠾⠻⢶⣦⠀
  ⣾⠁⢠⠒⠀⣿⡁  Louis-Philippe Véronneau
  ⢿⡄⠘⠷⠚⠋   po...@debian.org / veronneau.org
  ⠈⠳⣄



Re: Questions about inconsistencies in the documentation

2024-10-29 Thread Soren Stoutner
Does anyone have any comments on making the documentation more consistent?

On Monday, September 16, 2024 1:59:09 PM MST Soren Stoutner wrote:
> While reading over the documentation I noticed a couple of inconsistencies.
> 
> 1.
> https://salsa.debian.org/python-team/tools/python-modules/blob/master/
> policy.rst
> 
> "All team members should of course follow the main discussion list:
> debian-python@lists.debian.org”
> 
> "Team members who have broad interest should subscribe to the mailing list
> debian-python@lists.debian.org whereas members who are only interested in 
some
> packages should use the Package Tracking System to follow the packages."
> 
> I am already subscribed to the list, so I am not concerned about this
> personally.  But it seems like we ought to pick one recommendation on this
> subject.
> 
> 2.
> https://salsa.debian.org/python-team/tools/python-modules/blob/master/
> policy.rst
> 
> "debian/master - The Debianized upstream source directory.”
> 
> https://wiki.debian.org/Python/GitPackaging
> 
> "debian/main (formerly debian/master) - The Debianized upstream source
> directory.”
> 
> "To prove that all the branches got pushed correctly, in this fresh clone,
> checkout the debian/master”
> 
> "You will need to push the debian/master branch”
> 
> "Set debian-branch value to debian/master in debian/gbp.conf”
> 
> "Commit to debian/master branch (use git branch -m master debian/master to
> rename the branch).”
> 
> "Update .git/config branch debian/master to refer to merge =
> refs/heads/debian/ master.”
> 
> "On Salsa, set the default branch to the new debian/master branch.”
> 
> “debian-branch=debian/master”
> 
> etc. (there are quite a few other references to debian/master).
> 
> I am uncertain whether debian/master or debian/main is recommended.


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

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


Re: electrum: How to enable autopkgtest?

2024-10-29 Thread Andrey Rakhmatullin
On Tue, Oct 29, 2024 at 11:11:44PM -0700, Soren Stoutner wrote:
> > > I added a Build-Depend on "python3-pytest ” 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


signature.asc
Description: PGP signature


Re: electrum: How to enable autopkgtest?

2024-10-29 Thread Soren Stoutner
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 ” 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


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


Re: electrum: How to enable autopkgtest?

2024-10-29 Thread Andrey Rakhmatullin
On Tue, Oct 29, 2024 at 01:43:50PM -0700, Soren Stoutner wrote:
> I added a Build-Depend on "python3-pytest ” 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. 

-- 
WBR, wRAR


signature.asc
Description: PGP signature