#1063567 dh-python: documentation is unclear for setting env variables to control python version

#1063567#5
Date:
2024-02-09 16:12:39 UTC
From:
To:
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.

#1063567#10
Date:
2024-02-29 02:49:08 UTC
From:
To:
Hi Drew (2024.02.09_12:12:39_-0400)

Why do you need pybuild at all then? The goal of pybuild is to enable
you to build for all supported versions.

But again, not sure how useful pybuild is in that situation, you could
just call cmake directly...

Stefano