The docs mentions SNAPCRAFT_PYTHON_INTERPRETER
and SNAPCRAFT_PYTHON_VENV_ARGS
$ snapcraft version
snapcraft, version 4.1.1
...
This plugin also interprets these specific build-environment entries:
- SNAPCRAFT_PYTHON_INTERPRETER
(default: python3)
The interpreter binary to search for in PATH.
- SNAPCRAFT_PYTHON_VENV_ARGS
Additional arguments for venv.
By default this plugin uses python from the base, if a part using
this plugin uses a build-base other than that of the base, or a
different interpreter is desired, it must be bundled in the snap
(including venv) and must be in PATH.
On GitHub I could not find any usage of SNAPCRAFT_PYTHON_INTERPRETER
other than in snapcraft and its tests. **In case all parts shall use the same, non default python2/python3 version can I use this build-environment specific Python version?
According to the release notes of the Snapcraft v4 python plugin "The plugin can use an interpreter if it is added through a comprehensive list of stage-packages
(an extension shall be evaluated in the future to provide alternative complete python stacks)." That’s seems to be exactly what has been done in the code. Is that right?