#958152 dh-python: improve variables documentation (in particular how to skip tests)

#958152#5
Date:
2020-04-19 02:40:39 UTC
From:
To:
Hello,
it looks like the only way to skip tests for the -dbg interpreter flavor is

export PYBUILD_DISABLE=test/python2-dbg
export PYBUILD_DISABLE=test/python3-dbg

(for example PYBUILD_DISABLE_python2-dbg=test does not work, which is extremely
confusing and unintuitive).

which is not documented either in pybuild manpage or on the wiki page
https://wiki.debian.org/Python/Pybuild .

I think pybuild would greatly benefit if there could be a complete and detailed
documentation of all the variables that can be exported and what behaviour they
change and how.

Thanks,
Sandro

#958152#10
Date:
2025-03-15 15:31:49 UTC
From:
To:
I agree with this bug report.  The documention does not make it clear
how to set the environment variables that control dh's use of pybuild.

For instance the pybuild man page says there are options to set which
test system is used. Default unittest, otherwise --test-nose,
--test-pytest, --test-tox, etc.

But these are pybuild command line options.  The man page says we
would normally control pybuild in debian/rules by setting PYBUILD_ env
variables.  Which ones?
PYBUILD_TEST=pytest does not work.
PYBUILD_TEST_PYTEST=1 does not make sense (and does not work)

What are the secret magic incantations for controlling pybuild?

#958152#15
Date:
2025-03-15 15:37:25 UTC
From:
To:
Correction, PYBUILD_TEST_PYTEST=1 actually does work.

Which proves the point of this bug.  How are we supposed to know that
is the env variable syntax for --test-pytest, without having to wildly
guess it? Please add documentation for the variables.