Source: pyranges
Severity: normal

Hi,

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!

cheers, josch

Reply via email to