Currently the CHAINTOOL_PYTHON env var can be used to force the version of Python used to invoke chaintool.
That seems largely unnecessary since the chaintool "entrypoint" script is created at install time with a hashbang that leads to the version of Python 3 used to install chaintool.
I guess it miiight be useful if you installed using "python3" but occasionally switch that to point to other Python versions using update-alternatives?
Anyway... the part of the puzzle that doesn't go through that entrypoint script is the chaintool_completions_helper module, which we explicitly run using "python -m". If we defined an entrypoint script for that as well, it would get the same benefit as chaintool, but I really don't want to pollute the PATH with that.
We could do something a little ugly (in the bash completion script that invokes the helper) like look at the first line of the chaintool entrypoint script and yoink the Python executable path out of that hashbang. Actually hmm... at the time we install/create the bash completion script, we could figure out what version of Python we're running and enshrine that in the script.
Maybe then get rid of CHAINTOOL_PYTHON altogether? Not sure if the update-alternatives is real. But I guess it's harmless to support.
Currently the CHAINTOOL_PYTHON env var can be used to force the version of Python used to invoke chaintool.
That seems largely unnecessary since the chaintool "entrypoint" script is created at install time with a hashbang that leads to the version of Python 3 used to install chaintool.
I guess it miiight be useful if you installed using "python3" but occasionally switch that to point to other Python versions using update-alternatives?
Anyway... the part of the puzzle that doesn't go through that entrypoint script is the chaintool_completions_helper module, which we explicitly run using "python -m". If we defined an entrypoint script for that as well, it would get the same benefit as chaintool, but I really don't want to pollute the PATH with that.
We could do something a little ugly (in the bash completion script that invokes the helper) like look at the first line of the chaintool entrypoint script and yoink the Python executable path out of that hashbang. Actually hmm... at the time we install/create the bash completion script, we could figure out what version of Python we're running and enshrine that in the script.
Maybe then get rid of CHAINTOOL_PYTHON altogether? Not sure if the update-alternatives is real. But I guess it's harmless to support.