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


Groups > linux.debian.maint.python > #16419 > unrolled thread

Unable to set custom test command for pybuild

Started byJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
First post2024-10-31 18:30 +0100
Last post2024-10-31 19:30 +0100
Articles 9 — 5 participants

Back to article view | Back to linux.debian.maint.python


Contents

  Unable to set custom test command for pybuild John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-10-31 18:30 +0100
    Re: Unable to set custom test command for pybuild John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-10-31 19:10 +0100
      Re: Unable to set custom test command for pybuild Andrey Rakhmatullin <wrar@debian.org> - 2024-10-31 19:40 +0100
        Re: Unable to set custom test command for pybuild John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2024-10-31 20:10 +0100
      Re: Unable to set custom test command for pybuild Julian Gilbey <julian@d-and-j.net> - 2024-10-31 22:00 +0100
        Re: Unable to set custom test command for pybuild Matthias Klose <doko@debian.org> - 2024-11-01 08:40 +0100
          Re: Unable to set custom test command for pybuild Julian Gilbey <julian@d-and-j.net> - 2024-11-03 13:50 +0100
      Re: Unable to set custom test command for pybuild Antonio Terceiro <terceiro@debian.org> - 2024-11-01 20:00 +0100
    Re: Unable to set custom test command for pybuild Julian Gilbey <julian@d-and-j.net> - 2024-10-31 19:30 +0100

#16419 — Unable to set custom test command for pybuild

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-10-31 18:30 +0100
SubjectUnable to set custom test command for pybuild
Message-ID<JDH9E-5HO9-19@gated-at.bofh.it>
(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

[toc] | [next] | [standalone]


#16420

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-10-31 19:10 +0100
Message-ID<JDHMl-5Inb-5@gated-at.bofh.it>
In reply to#16419
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

[toc] | [prev] | [next] | [standalone]


#16422

FromAndrey Rakhmatullin <wrar@debian.org>
Date2024-10-31 19:40 +0100
Message-ID<JDIfn-5IDQ-7@gated-at.bofh.it>
In reply to#16420

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

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

[toc] | [prev] | [next] | [standalone]


#16424

FromJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date2024-10-31 20:10 +0100
Message-ID<JDIIq-5J5o-31@gated-at.bofh.it>
In reply to#16422
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

[toc] | [prev] | [next] | [standalone]


#16430

FromJulian Gilbey <julian@d-and-j.net>
Date2024-10-31 22:00 +0100
Message-ID<JDKqR-5JWx-5@gated-at.bofh.it>
In reply to#16420
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

[toc] | [prev] | [next] | [standalone]


#16433

FromMatthias Klose <doko@debian.org>
Date2024-11-01 08:40 +0100
Message-ID<JDUqd-5QK8-1@gated-at.bofh.it>
In reply to#16430
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

[toc] | [prev] | [next] | [standalone]


#16436

FromJulian Gilbey <julian@d-and-j.net>
Date2024-11-03 13:50 +0100
Message-ID<JEIdj-6lq3-9@gated-at.bofh.it>
In reply to#16433
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

[toc] | [prev] | [next] | [standalone]


#16434

FromAntonio Terceiro <terceiro@debian.org>
Date2024-11-01 20:00 +0100
Message-ID<JE52i-5X4F-3@gated-at.bofh.it>
In reply to#16420

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

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.

[toc] | [prev] | [next] | [standalone]


#16421

FromJulian Gilbey <julian@d-and-j.net>
Date2024-10-31 19:30 +0100
Message-ID<JDHMl-5Inb-9@gated-at.bofh.it>
In reply to#16419
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web