• Unable to set custom test command for pybuild

    From John Paul Adrian Glaubitz@21:1/5 to All on Thu Oct 31 18:30:02 2024
    (Please CC me as I'm not subscribed to this list)

    Hello,

    I need to override the standard test for pybuild and according to the manpage [1]
    this is achieved by passing "--test-custom" to pybuild. Unfortunately, it's actually
    not saying where exactly the parameter needs to go.

    I tried setting it via "export PYBUILD_OPTION=" but that didn't work.

    Does anyone have any idea?

    Thanks,
    Adrian

    [1] https://manpages.debian.org/testing/dh-python/pybuild.1.en.html

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Julian Gilbey on Thu Oct 31 19:10:01 2024
    Hi Julian,

    On Thu, 2024-10-31 at 17:57 +0000, Julian Gilbey wrote:
    On Thu, Oct 31, 2024 at 06:22:45PM +0100, John Paul Adrian Glaubitz wrote:
    (Please CC me as I'm not subscribed to this list)

    Hello,

    I need to override the standard test for pybuild and according to the manpage [1]
    this is achieved by passing "--test-custom" to pybuild. Unfortunately, it's actually
    not saying where exactly the parameter needs to go.

    I tried setting it via "export PYBUILD_OPTION=" but that didn't work.

    export PYBUILD_TEST_CUSTOM = 1
    export PYBUILD_TEST_ARGS = <custom test command>

    Thanks a lot. I would have never guessed that.

    Meanwhile, I found the following alternative approach in the README.rst [1]:

    dh_auto_test -- --system=custom --test-args='{interpreter} setup.py test'

    Your suggestion looks cleaner. If it works, I'll use it. If not, I'll stick to the
    approach above as it actually works. Took me forever to figure this all out.

    I think this information could be added to the Pybuild page on the Debian wiki [2].

    Adrian

    [1] https://github.com/p1otr/dh-python/blob/c5a56cdf8cf24b11ac68c980937cf0ef0921d2e0/README.rst#L104
    [2] https://wiki.debian.org/Python/Pybuild

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julian Gilbey@21:1/5 to John Paul Adrian Glaubitz on Thu Oct 31 19:30:01 2024
    On Thu, Oct 31, 2024 at 06:22:45PM +0100, John Paul Adrian Glaubitz wrote:
    (Please CC me as I'm not subscribed to this list)

    Hello,

    I need to override the standard test for pybuild and according to the manpage [1]
    this is achieved by passing "--test-custom" to pybuild. Unfortunately, it's actually
    not saying where exactly the parameter needs to go.

    I tried setting it via "export PYBUILD_OPTION=" but that didn't work.

    export PYBUILD_TEST_CUSTOM = 1
    export PYBUILD_TEST_ARGS = <custom test command>

    Best wishes,

    Julian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to John Paul Adrian Glaubitz on Thu Oct 31 19:40:01 2024
    On Thu, Oct 31, 2024 at 07:08:20PM +0100, John Paul Adrian Glaubitz wrote:
    (Please CC me as I'm not subscribed to this list)

    Hello,

    I need to override the standard test for pybuild and according to the manpage [1]
    this is achieved by passing "--test-custom" to pybuild. Unfortunately, it's actually
    not saying where exactly the parameter needs to go.

    I tried setting it via "export PYBUILD_OPTION=" but that didn't work.

    export PYBUILD_TEST_CUSTOM = 1
    export PYBUILD_TEST_ARGS = <custom test command>

    Thanks a lot. I would have never guessed that.

    (see "Most options can be set (in addition to command line) via
    environment variables." in "OPTIONS")


    --
    WBR, wRAR

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

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmcjzPItFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh u6QP/2M1NvznLNH4RErDJPBB/loPe4yMHxcsEJOlVFbBSkHvq1cVy1mDWTfWJtWU WT7s4cLpLKwRbPyQ4ZpqkDIv07CUKqKY9WgFBAFpKvCXMk/QIfIUxwEwXVoxTXr0 OlEhtKDtunMeH5+OTl0ybj4+iISdhW1rylnqE875KAu4e6hKjhOwJLNfJDCmqNVS u4wwbCW7Cyn+MVITUYjq0hmspvZXglzJIj614neQE1XXKTcqco7zbJqlGtURtq+U WU5xHGUimv/0pzmsLwaoEsTTwyEQrr+uPc6XlAZWxWFiVBqUmTTTzI7c+B+X+69M JxBo9PBy+P7MZ90CyuJI4XyfhH+g9T1DTBS8lyzEwtZ7Q5ck05KXQDiVGL4GTg2W IngC0elpMkCLsejfumtbO6/u9Iob0aJk12kxCtAAzTv8SseLiv6hYfhBPUf+YJhr UUDqTzoA2QO2zzOQB/eFMkm30YCM0uRMOFu2ydz8UG/LcdGUEP2/32QLe8E9kO3J 92qZPD486PJPyqoOCHZ8lPXc6U/9mBwiBGpMqwatHm8/Bqw87zcI/jw0HGz+aQwz KuSseifzwgw+7Jr4+WTCqI2wdUmNmctZvsEIu2gWXTcI4WPGI/CERGSqG+UtzyXQ 4NIhPUS49Py7pL2g8ZnUqDp6DiPnp09s45VmbiJeHoNbnlEt
    =CTEi
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Andrey Rakhmatullin on Thu Oct 31 20:10:02 2024
    On Thu, 2024-10-31 at 23:31 +0500, Andrey Rakhmatullin wrote:
    Thanks a lot. I would have never guessed that.

    (see "Most options can be set (in addition to command line) via
    environment variables." in "OPTIONS")

    Yes, but it doesn't show the actual syntax.

    It would have been more clear if it included examples:

    "--test-custom" can be set as "PYBUILD_TEST_CUSTOM", for example.

    In any case, I have figured it out now. Finally. ;-)

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julian Gilbey@21:1/5 to John Paul Adrian Glaubitz on Thu Oct 31 22:00:01 2024
    Hi Adrian,

    On Thu, Oct 31, 2024 at 07:08:20PM +0100, John Paul Adrian Glaubitz wrote:
    Hi Julian,

    [...]
    Thanks a lot. I would have never guessed that.

    Meanwhile, I found the following alternative approach in the README.rst [1]:

    dh_auto_test -- --system=custom --test-args='{interpreter} setup.py test'

    Your suggestion looks cleaner. If it works, I'll use it. If not, I'll stick to the
    approach above as it actually works. Took me forever to figure this all out.

    I think this information could be added to the Pybuild page on the Debian wiki [2].

    Sounds a great idea; please feel free to edit the page to include
    this!

    Best wishes,

    Julian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthias Klose@21:1/5 to Julian Gilbey on Fri Nov 1 08:40:01 2024
    On 31.10.24 21:53, Julian Gilbey wrote:
    Hi Adrian,

    On Thu, Oct 31, 2024 at 07:08:20PM +0100, John Paul Adrian Glaubitz wrote:
    Hi Julian,

    [...]
    Thanks a lot. I would have never guessed that.

    Meanwhile, I found the following alternative approach in the README.rst [1]: >>
    dh_auto_test -- --system=custom --test-args='{interpreter} setup.py test'

    Your suggestion looks cleaner. If it works, I'll use it. If not, I'll stick to the
    approach above as it actually works. Took me forever to figure this all out. >>
    I think this information could be added to the Pybuild page on the Debian wiki [2].

    Sounds a great idea; please feel free to edit the page to include
    this!

    sorry, but this feels like a bullshit comment. pun intended.

    the pybuild information really is not adequate. but requesting people
    having questions to just add another tiny improvement to this kind of documentation is not helping very much. So maybe the people already
    knowing all the quirks could come up with a way to rewrite the docs?

    We even could have that as the first topic for a Python BoF, before
    starting any other topic ...

    Matthias

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antonio Terceiro@21:1/5 to John Paul Adrian Glaubitz on Fri Nov 1 20:00:02 2024
    On Thu, Oct 31, 2024 at 07:08:20PM +0100, John Paul Adrian Glaubitz wrote:
    Hi Julian,

    On Thu, 2024-10-31 at 17:57 +0000, Julian Gilbey wrote:
    On Thu, Oct 31, 2024 at 06:22:45PM +0100, John Paul Adrian Glaubitz wrote:
    (Please CC me as I'm not subscribed to this list)

    Hello,

    I need to override the standard test for pybuild and according to the manpage [1]
    this is achieved by passing "--test-custom" to pybuild. Unfortunately, it's actually
    not saying where exactly the parameter needs to go.

    I tried setting it via "export PYBUILD_OPTION=" but that didn't work.

    export PYBUILD_TEST_CUSTOM = 1
    export PYBUILD_TEST_ARGS = <custom test command>

    Thanks a lot. I would have never guessed that.

    Meanwhile, I found the following alternative approach in the README.rst [1]:

    dh_auto_test -- --system=custom --test-args='{interpreter} setup.py test'

    Your suggestion looks cleaner. If it works, I'll use it. If not, I'll stick to the
    approach above as it actually works. Took me forever to figure this all out.

    Note that when you use the PYBUILD_* variables, they also apply when
    running under autopkgtest, so that is better than overiding the
    dh_auto_test call.

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

    iQIzBAABCAAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAmclIysACgkQ/A2xu81G C94esxAA7bx1wFozLEaShUezeEX+U+q0xQPW0s2rauFZi7fwY9+0ncpicIwigTHq /V0nQUmsGdlXcKWWTznKaSGOH/zEFT273S1XpdlZh2RyXTHew3W+QllYLAcs8hc3 R1OU7qJ8KHhEZOgeJXgGYwjDHTyCGJV3WERYoW74A2/lrfj0liUZTYQgP3gnpvIZ 4cku4KUsih1X3W9GlJhYSingQOijIbAq0n2+ohjfjnSrcFRCrPt8tF/fQTnrZJhD JUNLaMUyWxNfAQjOWIrv7wPjKWNmUcstWIYvT+d8fxwuP6/Gdq6IpEgzLMVK5FzD a76jHw6dG6Z6gkuvaboxOxuE328qD/zgPNpNpP4/m/oa8NWag4N4fZAGf8teeh6h eQUSp3ztNo1NFFd1aZqM3hRm8Z/3XNHEEx1ftv9PyoRBlh5MBQgI8syHSue1vgiZ 7tgL8zr3687M3ua12f5O31q/IjG6atzdxCQZK7zK6QWkSJNe9MSB17Bo6DSYXL/x 3uQRgqAG0F3U6x2uU4yB1ee30AF0n19/2vJxXUSqD52Kaj3Fhcc/gbpqelU5RFkC dxpEM3rCIVFauiJwAcAGzVNfnYkudl0rFjnVglf1h3irT2p2zz4XVRyMR9pIneQL VsBmGiBasKfAPg8lhcabcoSZUkv2QP6xI3CpCf1hZy/oJDTES7Q=
    =Nl5+
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julian Gilbey@21:1/5 to Matthias Klose on Sun Nov 3 13:50:01 2024
    On Fri, Nov 01, 2024 at 08:33:38AM +0100, Matthias Klose wrote:
    On 31.10.24 21:53, Julian Gilbey wrote:
    Hi Adrian,
    [...]
    I think this information could be added to the Pybuild page on the Debian wiki [2].

    Sounds a great idea; please feel free to edit the page to include
    this!

    sorry, but this feels like a bullshit comment. pun intended.

    the pybuild information really is not adequate. but requesting people having questions to just add another tiny improvement to this kind of documentation is not helping very much. So maybe the people already knowing all the
    quirks could come up with a way to rewrite the docs?

    We even could have that as the first topic for a Python BoF, before starting any other topic ...

    Apologies if my comment caused offense; I had not read the Wiki page
    so have no views on its quality or usefulness. I was going on the
    general principle that the Wiki is an editable document, and if there
    is a way to improve it, that is generally a good thing to do. But if
    the whole page needs a major rewrite instead, and that is feasible,
    then that would obviously be a better thing to do. (I am no pybuild
    expert, mind you!)

    Best wishes,

    Julian

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