[Debian-med-packaging] Bug#1082494: Bug#1082494: build ignores requested number of parallel processes

Étienne Mollier emollier at debian.org
Sat Sep 21 09:52:55 BST 2024


Hi josch,

Johannes Schauer Marin Rodrigues, on 2024-09-21:
> when building your package with dpkg-buildpackage -j X, which sets
> DEB_BUILD_OPTIONS=parallel=X, the dh_auto_test step ignores that setting
> and will run with whatever `nproc` returns regardless. Untested patch:
> 
> --- a/debian/rules
> +++ b/debian/rules
> @@ -10,7 +10,13 @@ export PYBUILD_BEFORE_TEST=\
>  	&& cp -av {dir}/tests/test_data {build_dir}/tests \
>  	&& cp -av {dir}/tests/data {build_dir}/tests \
>  	&& cp -av {dir}/pyranges/example_data {build_dir}/pyranges
> -export PYBUILD_TEST_ARGS=-v -n $(shell nproc)
> +
> +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
> +	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))"
> +else
> +	NUMJOBS = $(shell nproc)
> +endif
> +export PYBUILD_TEST_ARGS=-v -n $(NUMJOBS)
>  
>  %:
>  	dh $@ --buildsystem=pybuild

Thanks for the patch, I applied it, modulo the typo at the end
of the "patsubst" line.  Sorry I didn't think of situations
where it is desirable to run builds and tests in a single thread
when hardwiring pytest options some time ago.

Have a nice day,  :)
-- 
  .''`.  Étienne Mollier <emollier at debian.org>
 : :' :  pgp: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
 `. `'   sent from /dev/pts/0, please excuse my verbosity
   `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20240921/600b7644/attachment.sig>


More information about the Debian-med-packaging mailing list