• electrum: How to enable autopkgtest?

    From Soren Stoutner@21:1/5 to Debian Python Team on Tue Oct 29 13:43:50 2024
    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?

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmchSQYACgkQwufLJ66w tgPh8A/+NaXXP1oRuL4lyRfGAEaEPRsGk5/9Ju9Yt7wmaaTZ/qGtq/fJsR/e037X YtYcMuBzNKIrhXHcaQxfBvqx3f4WL5DvpNTk2LTLieuI6Jlkg4IWgKaMHs/obtjJ rXwTfqGkM4xcslytYWp+lf+TloRqwdRYuxRiS7Zfkdo0us6MpbYutMTq0ZJTUnoy 7VyYxyun6Mk+P5a4YqH3jWag2wgjgJ4+Fcbx1SUCOSeWp6ChQdPWh02ijzwVlNrL k2MQZiO//HYuIH9/A0WisSeROCyzM6neb/axLaqxTl9KmW5nXElJtKoKz4y8uOhc yGhqvJ7X1bMSCTJKzRQtLerfFsvLR0+YzN/YV+S5M+3AP5gaM5+jVQ/5TuPF6s4i dROhqFJHmpvMp9tA+cG498yJEXVrHmcWY6FEv93OxkqipFbxmwMpVR0CauISDNTO g5eKoWa1olNHynOJv3Wi+Eo8rb5t42cpy/y/Bq3bLxzClo6vPkhtCxxcs1aGcEcp BErGDqVdaM2PV7AdNpLTmbWibdJmupQ6TOeSo77p8rf1gZUbjWpZmKC0rNyXb6Wa Ubv5crc5rx/qq7kNGC+b85Z5cdJ9nYfSa4Fz/7PQpjR/iKSoru+Dt7jQIeEyINxr TVf7D9cfcr0LTak90JWTy2mVsS4HaAi5Q5+mnrC0D5nDtPEn6O4=
    =zBD8
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Soren Stoutner on Wed Oct 30 06:50:01 2024
    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.

    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmchyIMtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh tK4P/2h5sfRfOCEVdcjODHHsp/IGc44gyRBMDAqqdUXAkOEHqzNolAM/ivNR2kb4 3p9PmyHt2ZyCt8fBTu9Uh35Drlw8BzquoauvwVhAYyg4Dt4gE/NxZI4/3Ov4cBM6 T8mlNfUSkDpKER5o4rix8lZpRw9yTAfj6q0MJew4ImsUovm5fjm6qK36J9njh6aj 9ni+Xr8x/q5GnGLB59RgZu4NW94Co8f65c4abthFn0gA9Pf5lRgSWc8b6UMKUHFp MfRfO88n8LxQMYFXPuUGSMazoqv+0WhumGtIaGJpM7yo5xxp0EFZyGG6y1gfLi7s wX/kvT/6596FvElTdm6arL5dRPKqjSNbkHL16Wtq/FpCj1AwE43cGynZR1m1oGfE +Hiqxpn2/QwvHRiRN7HtWaddanVogmgdGw2gSdA7oGYpKukRKU35A9jJQac6/Ebf ldYITY6YnvO+/ItYLaJgbnpDU7hI61Lm8ibmgJN+JvdQRQOQjZC7YZzZ1HmGzR7P DzMsLDNo8XKY+zA1W9EWbNh0p+ptxuPve93O5xjyDwRcJpumAFUnRb8Q6Rq1bbns ACu6EKgKk5G2aeOmFlEmboNhkXDGqRmsfv5PTBd/ql9zxwiHmOtphQw2LPx2EKlc lBsKbDPUF+Xf9MBW2P6I8W3xx3BSako2XJgJpX+h1hNnJYHr
    =SNwX
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Soren Stoutner on Wed Oct 30 07:50:01 2024
    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

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmch1qotFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh ORwP/3efaiktYKLKqF7clOaXM9nOD8ECB0iSNsvyZ/zqidYadXaitHQ/iQlfwO3E aPc4VMDZyW4bzJaanzMqlTeZydoORoL3b0oWM2AbtzAX5lC7vaj/bfDYDUIVrTuJ OQn8i0WKYBwj0wPG7Skscg7EuvVIo4Tjwm9xWVrhH8MHlCNQ01z7Zhvn68d7rwR6 EFSTQcsGgolD4rZC9ZRMJeNbEWmtYik0ZftX8YMooxDNHMXWEAVJa5PXtQodQFTy Hb39AY4qJZ7hWf1zDY2oX77H15Ld4KboQvFwtkNQjTi0h+w0YESFYa5I3+oz/T8p 69qIJw6FmJTog4/7EgZ5nCgYI4LU1XCmNeCHU0EdvjpTUxzhB1yV56EOCTFSmCQ/ UDQ7myl8xfJxwW1sXuMQ3W0TCdw8eJ0f5vvnPJYIFJekdJTep+cxihJji3RxMVAj DiY38YOrvzjesiJ/Vi9rTqt+cSyHfclWwdJ9/492cBFQntrn7MwqQf+FuHxiwevP uE8ukxqtfdZYx6ymfUtnxRCnI3SdvWBeJGekxF4tHQZlWbp10p9OzbFDYSZ3p3Mb qAmJ1rBzapLxK3GZx2S1+QIQ5liKZWGlTBoUB/uRYR6aJfQwc8LQsEgI7uxul0nh yDK9DAaAm1t+jSp0q8mGtQzhSq+9V1D1Ln3DBiaci8bcGQzQ
    =TQyl
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Tue Oct 29 23:11:44 2024
    This is a multi-part message in MIME format.

    --nextPart3364190.2qmJ40n8AI
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/plain; charset="UTF-8"

    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
    soren@debian.org

    --nextPart3364190.2qmJ40n8AI
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/html; charset="UTF-8"

    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    </head>
    <body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Andrey,</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">On Tuesday, October 29, 2024 10:47:47 PM MST Andrey Rakhmatullin wrote:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; On Tue, Oct 29, 2024 at 01:43:50PM -0700, Soren Stoutner wrote:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; I added a Build-Depend on &quot;python3-pytest &lt;!nocheck&gt;” and added “Testsuite:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; autopkgtest-pkg-pybuild” to debian/control.&nbsp; This enables the tests during</p>
    <p style="margin-top:0;margin-bottom:0;ma
  • From Soren Stoutner@21:1/5 to All on Wed Oct 30 00:06:32 2024
    On Tuesday, October 29, 2024 11:11:44 PM MST Soren Stoutner wrote:
    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

    Looking at things more deeply, the underlying cause is that the upstream source contains GUI environments for both Linux (Qt) and Android (QML). In the build environment, all these files are present (this was the key I was missing). But, in the Debian package, the QML files have been removed (because
    they aren’t needed).

    (Andrey, as I’m writing this I see you just sent me an email explaining the same thing.)

    The test in question is test_qml_types.py.

    If I disable it in debian/rules using the following command the test no longer runs during build.

    export PYBUILD_TEST_ARGS=-k 'not test_qml_types.py’

    However, that doesn’t fix the autopkgtest problem. I still receive the following error:

    I: pybuild base:311: cd /tmp/autopkgtest-lxc.0qtzuqhg/downtmp/autopkgtest_tmp/ build; python3.12 -m pytest -k 'not test_qml_types.py' ============================= test session starts ==============================
    platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
    rootdir: /tmp/autopkgtest-lxc.0qtzuqhg/downtmp/autopkgtest_tmp/build
    plugins: typeguard-4.3.0
    collected 688 items / 1 error
    ==================================== ERRORS ====================================
    ___________________ ERROR collecting tests/test_qml_types.py ___________________
    ImportError while importing test module '/tmp/autopkgtest-lxc.0qtzuqhg/ downtmp/autopkgtest_tmp/build/tests/test_qml_types.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    /usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level) tests/test_qml_types.py:5: in <module>
    from electrum.gui.qml.qetypes import QEAmount
    E ModuleNotFoundError: No module named ‘electrum.gui.qml’


    https://salsa.debian.org/cryptocoin-team/electrum/-/jobs/6506576#L662

    I assume this is because autopkgtests enumerates all of the imports, even for tests it isn’t going to run.

    Is there a recommended way to disable this test entirely, including the import? I would assume at least one of the following would work:

    1. Use some other command (of which I am not aware) instead of "export PYBUILD_TEST_ARGS=-k” that causes autopkgtest to ignore the file entirely.
    2. Patch out the import line in the test using debian/patches.
    3. Exclude the entire test file when repacking the upstream source.

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmch2vgACgkQwufLJ66w tgNv5A/+KOyGUO0YPMo3C+b+fl75l556wmAi1mH7FronBa+ABrZQNyaKDj//D6eJ WAJb+JQpyfSJzA696viIvm5mHKx+bzfVxCgI//ZICl/c/AjQVZcxYPyAuIJJeLly L6//M3priwPIoIm4Gf9Ws5RHun7yZEXfx7j1huVrukbYYslHZff3235ViRK8Ei5v 47dTElOmfu7RugKdKkqbjVY8vGxiuPndhNAxecX+5kGi5kcXzDVHqIyN0HA0Hplh Y22Owjm6cmyTL2HnE/MXNXrHAleZLK9O6hzThn3U2HhMzvZCEod+uKiTM16+3j6R o4RZ+gAn4bxVsQJe4OZGveINs5JLm3EEz49n3rWfHzDTGtuJT/feN08lADY2Bsbv 6DU9QwtecMjS4XD4lub8bYHGDMUZPMQjXa19o+pcs2OZRq6po1hKhv4LMElAI0dB urlf3D88Pd41eLMXEx/61ot9BPgIpP2DbWF9PFs7KM8nc7LEKM9sfNTYvIftXwsp aPVqhtzg+dzfY03JXJvsUU9XbJKUR9w2tmfwiVGnr6sahvucZ6an+8p4q3IFSTrB LJHh/3wRH5Khmj75cXMf5mDu66eSP1AthxyJ3kCW6iIPJgkOJO+VmSDSllQGx7qm dAaTk5VcrhTEKAE2zsrv/7xgyRJHoDgTJzzGf77vDVd8KNMS2LA=
    =LRIl
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Soren Stoutner on Wed Oct 30 08:20:01 2024
    On Wed, Oct 30, 2024 at 12:06:32AM -0700, Soren Stoutner wrote:
    If I disable it in debian/rules using the following command the test no longer
    runs during build.

    export PYBUILD_TEST_ARGS=-k 'not test_qml_types.py’

    The correct way is --ignore tests/test_qml_types.py



    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmch3VEtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh 6ngP/0f0Kh0bg4DTGOTYHokTGk0MYT3dkOCpK525XF+Zj9jyxIwVOq3EDW/+EFhU vXD6mhKFTSw/404gaKYzxMsCI8ON6Ku2l0mBtSjo5te7UuznUNXLrBJ/wz2ohoDS oiUDr93fTwIY5oxiyFFzmL5gPEP1TAQn0Kx73l7N6fTHcA7kfSx9IyRhnA78LQ7h kG05HkJRLBiwXUtJ1UmbzavXVRoishF2NZDZswvdBhd3rzldt5X9fjzOUrYSyEqf IQqAoOpcLCelBQnoW3+pg/5X6QScx64M+EQDcmusp4QIxIWHSiZYyya7DgqkNX3K igfh4qVoaKINd0zV2OcpzzqU1HU82S+iSNPn3b6ZIpGvk1nkL3SEYFLyaLfboYN1 5Sc6Y6sVP4cQHDR6YsJkGW/UQk2FyQMSavmHNDGlYbG/CbbR1SSCnks4chJkOxzW KBpxbsJh0ZajRp0PwmU/3RXCW1ZY1zGaVLCdAbGEiBACxqj5WXCQPNcx7s9T7LSZ 7YjTMXtNLBA9HpinRjdMXdIlfyeYpZ7wGxpA8s53SjZV91T42do2+CSP7cIclQK5 7lJht81jyo9gXvLNtVGAbWJBeCNaLbm4pUqCC7VkBsXjs6abqFY/FZJG7gF8gvub V/MRjp9eHGGehdQcfkE/hylkBo+gKEkwpKeuE2zNA7+e+WC/
    =+k7j
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Wed Oct 30 00:28:27 2024
    On Wednesday, October 30, 2024 12:16:33 AM MST Andrey Rakhmatullin wrote:
    On Wed, Oct 30, 2024 at 12:06:32AM -0700, Soren Stoutner wrote:
    If I disable it in debian/rules using the following command the test no longer runs during build.

    export PYBUILD_TEST_ARGS=-k 'not test_qml_types.py’

    The correct way is --ignore tests/test_qml_types.py

    Thank you. That works perfectly.

    Do you think it would be helpful to add that to the wiki at:

    https://wiki.debian.org/Python/Pybuild#CUSTOMIZATION

    Should it replace the information about the -k command or are they complimentary, with each having advantages in different scenarios?

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmch4BsACgkQwufLJ66w tgNp2g//T9ZSFgcdXaSDIAZntjVB3FjRZFbRE+ltdbujvsk2hNNWhefjLcn3IzJg 6uAvVGtTmGXKBpqekfBbvrpFv/bEagR8X8ZzoqLjWGzZHK7yjGdUMbFCuwgIYFMl VERh55DSp/F+GPN9JhdJIX41k1VYg+Yh+NPCpBLytgSFhFKyY/lJ6IYopWfrZ/gH oyOXnTqCVZMLYDN8YapcA8aYb2ssBhGSZMzNShdZU7ycUuT3wJX9GPsZdnrpTdrG C+hda5GExYGVJN0h411Wbhlyjtl1b6ZutDIs0F1fGBkVe38N8GX/+cHYlBqhtWOv FsNwFmhu/w7Sh2WQv2Ila8RC8Prah8oReBztpa9rk1l/U7sftnTP1AwFiwqPu4RH VEVjC9QkIw2lln3dgaewETLgH6wxos6h/gtIclyk/dLzbx3trBdWshlO55lpvb6a uQ/qB6alKTwr48FuG1NkuefHyqVZFfnXh+9s0M9R/ykT04RMDQ6ThbB+uJdasfEq y52FqnJfbl0XbsojUX+MgrBkcJXLXzSpbOFs2uRhUV28V83k4FI/m788NE6CNZ2q F2fSv5k19odAX6bGtNgIGi1v5gy4I52uInaBHtEJ2L/mt3fuzfFyTUJ/lf+Z24Tv m9dxetqWTgDId1UVkxtwHuHU/OQJJe8u6uHFKi0vZgloi+bVaWE=
    =Dlio
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Soren Stoutner on Wed Oct 30 08:40:02 2024
    On Wed, Oct 30, 2024 at 12:28:27AM -0700, Soren Stoutner wrote:
    If I disable it in debian/rules using the following command the test no longer runs during build.

    export PYBUILD_TEST_ARGS=-k 'not test_qml_types.py’

    The correct way is --ignore tests/test_qml_types.py

    Thank you. That works perfectly.

    Do you think it would be helpful to add that to the wiki at:

    https://wiki.debian.org/Python/Pybuild#CUSTOMIZATION

    Yes.

    Should it replace the information about the -k command or are they complimentary, with each having advantages in different scenarios?

    They are complimentary, --ignore skips the file at the test collection
    step (https://docs.pytest.org/en/stable/example/pythoncollection.html), -k
    and -m select/deselect specific tests (https://docs.pytest.org/en/stable/example/markers.html).


    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmch4Y8tFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh OaUP/1Dc5MAuWgdJ7KaWHghtyi38cNnTRvyEpMjDsinj6Ip9Yr8DTkoTXbMaINqx WNdgWn2qwMojywnpAiqq8dfTMk6d1bwyWR4vqE15VT2OhnlbO9N7Huu7lJDS2mct vKcCCIYqhfDcpR6o7Ip6DV15sUcCL4DjXEDvaZdi+5Cy4GIbq07jekZ7jdXHO5u7 8D1K/faP1OeL8+V1PF1lc+J2bBv55trzH/zImyIYDegVATHA8/WdMU+KZ+r/SCme Ea+foHlTogTvif52zyYXxaYVCO5EEielcSBTMD13vGS4S0Ph114BQGOjDZRWaHdN 7aGI8K3gkZ1SDcaZUs6ycTxjKhS1cvIlVB8UA7v7wGdR4uHngOp/wVtdoBAv8lGv Ak7xEYg2Iseb0/oWdKpO77ef7P78xdK71C7+RPBrt1DoaQ6ybwbrLXwUZaGzEUBs 7BhPDEmkl8NxOyMowmTcgm2Cb+XxRIHt0keYyBEutjf/wazjzmYmaZ+XpTusecj9 Fq9m5B93C1PA9ZI0eGZyPvRBZ1J3vQvbjiCdUbMGlXQiSzHvaAZ9RjinV1A+PQfK x9UKiFQknfGnCBk8wJFL6RSLMk6A67Es5nlTzrtyVXb1ENGy1AVF7hRU9RNzf4io +M2kHNv/svjKD553zkQkzbipycQxb5CwjzxnaBDIea8TMAzj
    =RJ0P
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antonio Terceiro@21:1/5 to Soren Stoutner on Wed Oct 30 14:10:02 2024
    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.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAmciLb8ACgkQ/A2xu81G C96XZxAA5Tf4iDlBItFtYJoQteAHSxmymh6W/JIqJhP5ADGjEC4Y13G0PEayXClY yozl6lXhb492V3D43hTGW38EsdfYVA6vM0BQd3HDh5RMD4QXXIx/ZkWU3l9OQqhA y8PoBCUmpCgHrxnXlwlHX5peDcBTqdnVl/aaOm40BMSvaxu/tPWdSEZ9F/COO297 FSwqbCM1zQWZslc++o7TjHI6HzjEtiN/wndYDpQ89Q0hKdy7Q9KDVcoK3KRVaYPF NQ1CKdg8LfVuklyXeNDVxGHv4nSkc2Prwj1TsM/q7qocuEn4lqa8c5rvUjYRhYIK 6SSwfroldYkNxpFFuapwwAYueavxA4BmAoNpFypXERKfqeOWqESdyx6l6qND4Tjz 9yY/DpXaQHdyD5QywXoVpXarEKa8eVted1yfrDuOdaucdnpX27WlUhN0gM50bkPF /IkK2yCQbje9QrEQ3IU3fQYzuTtpDj4HHP9MbFm1Qbb2f1/9efBgr5HeK6QG/fFR UQ+8sVyRqGxNzVUILFJuHwJAAChbicVcRtC6JPPWXHbSj7S1g+mdxdFw7MKeJ+C4 Q6I236NbccvBvblVa6aj2WqEi49R5o7TZZ9HF3rKQTb7+wG3NfrAJVwPmbioG/tc CYiXFlxDJ2iYIc9ZAnsceEo1UqXYRJlL234dF+hsA6n4CcqL2mk=
    =u/7c
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hefee@21:1/5 to All on Thu Oct 31 19:40:28 2024
    Hey,

    Looking at things more deeply, the underlying cause is that the upstream source contains GUI environments for both Linux (Qt) and Android (QML). In the build environment, all these files are present (this was the key I was missing). But, in the Debian package, the QML files have been removed (because they aren’t needed).

    I'm wondering, if the QML GUI is really only usable on Android. Did you checked, that it is really not usable on a Desktop? If the QML GUI is optimized for phones, that may still be interesting for Mobian ( Debian for mobile devices).

    I did a fast code check and at least the QML Gui uses Qt 6, the Qt Widget Gui used the old Qt 5 ( that has EOL since May 2023).

    If you include the QML GUI you properly want to use debhelper-sequence- qmldeps to detect QML depdenencies in the qml files. Me created dh_qmldeps the last weeks, as more and more Qt based apps using qml.

    Regards,

    hefee

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEOewRoCAWtykmSRoG462wCFBgVjYFAmcjzxwACgkQ462wCFBg VjYR3Q/+OZaef8pHuiHIq+8NBjucEOvMSwpF3/F7jt7J1mju5HjwWr2e7CnOwtm7 y+3BI2gKBqgkI6uMc/4enjt/eqfdH5DyQeOSeMcBoPQJh1C0VwDgFqM6X8YcLgkr wQJaVgbVENj5mV1pH+siTBU15gld4Sz2YkH4L1QPhF1dzi0oobLNWLcjc4U/wtG9 z/zxDEtaNb6mc8pbRoUbHzMhjdOoFQaW3M4E+2UdjMcHyoZrbkjDmElqi5BwZrVA XWCoLkCb3HTBZxbn4E8ZH+fO4MD+aZUX3ORFWWp8nppYuKlbfE8c2fol8r4D36Sw xOcR3DBgc6lHiBuS3bY7bbI8ZqMu3fC3vwW8ERAHtrzL1j17Ymd01NTl/CnzNR10 yF3CrWfEqVAUVzLWnrfr2aAy2X0csr0gnrcvkH+4kkV8hFanXy9QW3heSjw2RMwp HHZRR1Vzy3CCjqdMwFy63u1oyzFR6FooN3c+y7aSdFqiNAFE48P09/UCTKoXoQkj Y8a6fH/XGYzSn2dbA2tTwEeLdoRJJqAGhMQGR5EuF4LiwmU/t4GBxcDA9Qq7mNvs LDRJx+vAA1hqSNiKdiJB25bje4rejJ7B3LD0AeucqDn2bVnclAnW8k3DcbPMOD0u A2vosnnd0zklNxYLs+I+6mSfrZ+HJznz8JBpuAA6s+Inca6SHuw=
    =w21b
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Thu Oct 31 12:22:04 2024
    On Thursday, October 31, 2024 11:40:28 AM MST Hefee wrote:
    Hey,

    Looking at things more deeply, the underlying cause is that the upstream source contains GUI environments for both Linux (Qt) and Android (QML).
    In
    the build environment, all these files are present (this was the key I was missing). But, in the Debian package, the QML files have been removed (because they aren’t needed).

    I'm wondering, if the QML GUI is really only usable on Android. Did you checked, that it is really not usable on a Desktop? If the QML GUI is optimized for phones, that may still be interesting for Mobian ( Debian for mobile devices).

    When I asked upstream about it a while back, they said they couldn’t imagine it being useful in the Debian package, but perhaps it might be useful on something like Mobian. I don’t know if the QML implementation is tied in any
    specific way to the Android version of the app.

    If you have an interest in that direction, I would appreciate a co-maintainer that would take on the task. You could communicate with upstream (I find them very helpful) and test its functionality on a Mobian device.

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmcj2NwACgkQwufLJ66w tgMIURAAj0NwcGVtmx7PSU+KT1pXv1Co4rkS+u82b6ikBHkMA2anN7gV2ZDmwmBE i3epULalXPM5EI4CYbalbEUJOeDGRPXFVI7xVC9kQBnTbDPoKJnHvyLlVjILMraW 2yinAQIYfPhSl8xmOsA14JnI1xdmTLAa82TDYCQ9rHBvURQBRoxwwuveYL5G84GP CnPugn0DwzN2xA13SFsDa5Wqq3NtAwnAt85qGOhuFXFklLw4qosoCTHTWceYCPxF 4gRGa5d2JNH/7bnrgQGyJJqQNYsmCl6HHGmo7wIsQDdl9X5xa/qOPInFg9fMMuhN 7S0UK/2WXtp66t9Bqsu0FheB2riQBBsqmt2F9TgezfqYhfidG7PlA9XhbMwy7bM4 6wIGa3rtVmVTuXav18wOqRUVF6AahxM3R+DGjN9pZLzTi84yJ9L2QJHomtepw1P0 jZIK329HUrF1jaAdHOxPmzN/caAdbk9GVPUURsU3SgdEqD10/Lt7qSyyuy+0k2Nh a3QIqYpfpEjYqBjPXmkHC/G3WtGvz0F00hAxaNPiJu3ZiyqgkbQZehowfob6POyL tGp5+cy0UIi2Bb85MXUy4KfQtBYg4OBbeL7tHiXfzM20G8MTTRVyXYhd/kfE51HM x6cCKHmSesi1g7MOJYrrZZIqpFHFVdJzglIrLXKMScF6po9K1WE=
    =eIs5
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Thu Oct 31 12:43:42 2024
    On Wednesday, October 30, 2024 12:34:39 AM MST Andrey Rakhmatullin wrote:
    Do you think it would be helpful to add that to the wiki at:

    https://wiki.debian.org/Python/Pybuild#CUSTOMIZATION

    Yes.

    Should it replace the information about the -k command or are they complimentary, with each having advantages in different scenarios?

    They are complimentary, --ignore skips the file at the test collection
    step (https://docs.pytest.org/en/stable/example/pythoncollection.html), -k and -m select/deselect specific tests (https://docs.pytest.org/en/stable/example/markers.html).

    I added the following text to the wiki:

    *The `'-k $exp'` command skips running the test, but the tests are still included in the collection. This will cause failures if the tests have
    includes that cannot be satisfied. In that case, the `--ignore` command can be used instead, which skips adding the test to the collection.

    {{{
    export PYBUILD_TEST_ARGS=--ignore path/to/test.py
    }}}

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmcj3e4ACgkQwufLJ66w tgNCFg//WOnSgF9Zy+T1NPAhUCObtsOX9dMX0qjV1ymHBBL62v7CmPmqzkkcSEtY 4XFi818MXmitvnevlOnPO89A1AyseazHD61nJrsqE4rhppp4mwIdh3/L8MndHuv2 pj22+ehhxS9lTNTWqm1X+zVCYchYj1m1xR2HqxU2+Zat5B6QKFcV8FFeXkmllfQj qNmvJNShl1a6lwki1viJPQIom/oeD7lyxYw5yWyl4NOm2DLjWvlGIbI87bHbcpn4 s02TUmOelKEPI92y8ibt1WAqzYinMx9UDf1RRlhCiddWdNUIw037ZePtezJi0V8c j3+9hur3vKks6fPXUtjkbA4FOQyean8RRqYdtm/0uwoP4etzaEliBDPJUk1FWTb8 iPItmILymU0dAUL5qLzH3t2wlYqZPhaSnRnqCHd6kNz6XKc0fI/Bjch/ptHUWi1c +OevDt4KbVPwzHdipxcNHSmB6c8yxeoJOPZGJuPmc24a0vXEZOAQg3Xcctd/76Ka g7bNbc2keXgNn04ccNkPW+56N7tcTIKN77T5HJxXcQNW720ocaFu0/dRo+dfaPTn //5WNeBrzplT6MN8wTvWvjt4pb8LznmR0HHv+rzZd3xTwNIagrWXJMf7ylSBTgwd X6nAEJPK3kDg5AORrc8sPuOH4kfZxiNttbHgJAWewkCwaRlUMLk=
    =epHC
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Thu Oct 31 13:39:54 2024
    On Thursday, October 31, 2024 1:37:22 PM MST weepingclown wrote:
    Hi,

    this is not entirely correct as while '-k' can be used to skip specific tests with 'not <test>' it can also be used to only include tests matching a specific pattern (in both cases it is just matching the pattern given). It is probably better to rephrase it to something like "The `-k not <test>` flag can be used to skip running specific tests, but they are still collected.....".

    That makes sense. I would recommend you update the Wiki with that wording.

    On 31 October 2024 7:43:42 pm UTC, Soren Stoutner <soren@debian.org> wrote: >*The `'-k $exp'` command skips running the test, but the tests are still >included in the collection. This will cause failures if the tests have >includes that cannot be satisfied. In that case, the `--ignore` command can >be used instead, which skips adding the test to the collection.

    {{{
    export PYBUILD_TEST_ARGS=--ignore path/to/test.py
    }}}


    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmcj6xoACgkQwufLJ66w tgNy+A//ZvGtzqmEcPvEI2FDf/dJ47RD/RMauMyTwgMAasgvEF3qcJEDTFwF9hvN M+pM3rFotlcJPNlSyCcP3UHaMPeTuu4E8Xe26Wff6xCkxrzUeVQQob8CEmRuvYK6 dfbAuICxsF8Lfuefk+IVnH4zhcKi46gdIdJKpOXRRJEN3I1fGe34j+HY8ltgmP4u b3aF8mVOVXMWHzXkCzl15DQaz45N6B81q/v6LmdWsYkHEy87hcO09sIubW3tD+Rf nA8IfuHULRAQ556FHsItFQyRTQezQN2e+g7Swv3r4tFku5QxjyL0KlmHd+HL7hNa 9ghiGstSbgkhVUqpU12WHH4hRdPYMMPXVklzMYIorJcyqPahBHYTWdtAq3GWZ3mc QYiRswVChhdZCINszIg2FSjokR+7r6pU8taA5n/HVcYVYtDT6qT/xeZ/gCwdOmd7 P7wNK3JP3eOSm6fAaqGfvChj/RBXCM0vbxZ6Du7TTmEkYwXN2484bcLspiSnLmGx xa5o2ZL37Jh5EuTJMzhx7G1A0C2G7ngiiJlPwBG5FhQmEkzC0ydn8jNlbCHoGztp oa67O32kWn4o6wMAx+eGN59BaF0pKa074oxXNvd3x+ULThuDLNFNK2mIwGMkJHUd y9/QM1gUT3DE4CfLq2N9CJoZlL2bQ7iCGxlc+Z1MW8BTA3D2gWc=
    =p4ml
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From weepingclown@21:1/5 to Soren Stoutner on Thu Oct 31 21:40:01 2024
    Hi,

    this is not entirely correct as while '-k' can be used to skip specific tests with 'not <test>' it can also be used to only include tests matching a specific pattern (in both cases it is just matching the pattern given). It is probably better to rephrase
    it to something like "The `-k not <test>` flag can be used to skip running specific tests, but they are still collected.....".

    Best,
    Ananthu

    On 31 October 2024 7:43:42 pm UTC, Soren Stoutner <soren@debian.org> wrote: >*The `'-k $exp'` command skips running the test, but the tests are still >included in the collection. This will cause failures if the tests have >includes that cannot be satisfied. In that case, the `--ignore` command can be
    used instead, which skips adding the test to the collection.

    {{{
    export PYBUILD_TEST_ARGS=--ignore path/to/test.py
    }}}


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From weepingclown@21:1/5 to Soren Stoutner on Thu Oct 31 21:50:01 2024
    Hi,

    Sure, I can do that later. The time here now is late and I am quite tired, and given it is me, I would probably forget to do it later. That is the only reason why I haven't done it already and left a note here so that at least someone will remember it xD

    Best,
    Ananthu

    On 31 October 2024 8:39:54 pm UTC, Soren Stoutner <soren@debian.org> wrote:
    On Thursday, October 31, 2024 1:37:22 PM MST weepingclown wrote:
    That makes sense. I would recommend you update the Wiki with that wording.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Thu Oct 31 14:01:58 2024
    On Thursday, October 31, 2024 1:47:03 PM MST weepingclown wrote:
    Hi,

    Sure, I can do that later. The time here now is late and I am quite tired,
    and
    given it is me, I would probably forget to do it later. That is the only reason why I haven't done it already and left a note here so that at least someone will remember it xD

    Part of the reason why it would probably be best for you or someone who has a full grasp of the -k command to make the edit is that what I wrote was a continuation of the previous section discussing how to use -k to disable tests. That section doesn’t make any reference to using -k to include tests.
    So, a complete edit will probably need to include modifying the previous paragraphs to be comprehensively correct, which is probably best done by someone who has more experience with -k than I do.

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmcj8EYACgkQwufLJ66w tgOFeBAAlq3so7iCVtXwJRs98afNEqR+kKO/EClkCQL8GxFVFA9mGQdf7fCLcnG+ eW0Sj3QO7CJi3DqKo3uDhmoBfV5O6FV0gkBXImIfb1HOiA853C3jYNJI1pSi/cno GA9N1JuIUIgDNgWJKECMjBn8yEr/mnT/ntEnY5KAVVwwLTi+sVyjDDNgM7gqceME q07jLgq7lL6Fsrg6uc2tZ0CJtQdWwNkxO9VnOC78UrRLkhsFceJtT4PN45Mf75fM W1S6gig/oFQzQZugD8rLKamPvjhpk4EY9rTPOEIAH5uUdIwrDhO9hnJRCNS4YwlQ w6s/mghIaiyNCm0B2+Ca7vgq0WTf5vR4ubP9sAPS8gailRaiS5C2VV9hHXlpi/sW Y/4SDAiI63GPXPkfpY6NZGbHS5xAMoTksPLeWxrYqjjEujCF2xQaqq3yN+UQ1TUB seBjz31fVr0TyjPBnYWUM52oh7WoNzEcbZp/yVYpPbBqzb0klBlWSy3wMRuljv0j I9bpchJ+TvYTl6PfxsLTJafyJhM8aopOu7XEifUvQGfCSddSw1WTg0INR+v9d700 xgsMs8d+bUhJ4FYs6MRWtbg/kk8tU9vbhRatj65ga8bxqUGQOdYP6iQHGesXoIAz hDeOCy+v8IJfF6Ay4QApsRVko6oc2ZZIXxVItuofTYibuqAJYmA=
    =oM7U
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)