pybuild operations can be controlled to some extent with environment
variables. which is often more tidy than using override_dh_auto_... in
debian/rules.
The control I want to apply is run the build only for the default python
(adios2, for instance is built via cmake which only detects the default
python version)
It's not clear how to use pybuild's environment variables to do this.
The pybuild man page discusses PYBUILD_DISABLE=python3.9 for excluding
a particular python version. But this is the opposite of want I need.
I want something like
PYTHON3_DEFAULT = $(shell py3versions -d)
export PYBUILD_ENABLE=$(PYTHON3_DEFAULT)
but there's no such option.
The man page also mentions
PYBUILD_OPTION_VERSIONED_INTERPRETER (f.e. PYBUILD_CLEAN_ARGS_python3.2)
but that's only for setting arguments for a specific python version,
not for only using a specific python version.
How should debian/rules set up the pybuild environment to only build
for the default python version? It's not clear from the man page how to do
this using pybuild's environment variables.