Description
tox 3.24.1
When using {envpython} in a command (invoking a python script that updates an ipython kernelspec file - so I need the absolute path as the CWD is changing prior to nbconvert.ExecutePreprocessor() usage ), I see that the interpolated value is relative ( issue 1339 indicates tox 4 reverts back to absolute paths) to {toxinidir} location.
My question is: why, if I use {toxinidir}{/}{envpython} to convey the absolute path of the virtualenv python interpreter used, does the resulting path become the toxinidir path followed by the now-absolute path for {envpython}? Is it a design feature that whenever the interpolation has non-whitespace before the reference, it's converted to an absolute path? And as you can see from the tox -v -v feedback below, if {envpython} is argv[0] for the command, its full path is used.
{envpython} => .tox/py37-mylinux-rdf4j/bin/python
but {toxinidir}{/}{envpython} => /home/steve/Documents/ART-002/GitRepos/proj1//home/steve/Documents/ART-002/GitRepos/proj1/.tox/py37-mylinux-rdf4j/bin/python
And, as pointed out by @tucked, the tox -v -v output is somewhat misleading, if just {envpython} is used, the relative path is conveyed. But mixed feedback from tox [ fyi: {envtmpdir}{/}kernels is the tox.ini argument for the below --dir option, I used --tmp mytemp:{envtmpdir} to see what happens for that variable if non-whitespace before the reference - same misleading feedback]
commands in commands_pre= section:
bash -c -- 'mkdir -p {envtmpdir}{/}kernels'
{envpython} {toxinidir}{/}test{/}update_kernel.py --dir {envtmpdir}{/}kernels --python {envpython} --tmp mytemp:{envtmpdir}
py37-mylinux-rdf4j run-test-pre: commands[5] | /home/steve/Documents/ART-002/GitRepos/proj1/.tox/py37-mylinux-rdf4j/bin/python /home/steve/Documents/ART-002/GitRepos/proj1/test/update_kernel.py --dir /home/steve/Documents/ART-002/GitRepos/proj1/.tox/py37-mylinux-rdf4j/tmp/kernels --python /home/steve/Documents/ART-002/GitRepos/proj1/.tox/py37-mylinux-rdf4j/bin/python --tmp mytemp:/home/steve/Documents/ART-002/GitRepos/proj1/.tox/py37-mylinux-rdf4j/tmp
BUT
[32432] /home/steve/Documents/ART-002/GitRepos/proj1$ /home/steve/Documents/ART-002/GitRepos/proj1/.tox/py37-mylinux-rdf4j/bin/python test/update_kernel.py --dir .tox/py37-mylinux-rdf4j/tmp/kernels --python .tox/py37-mylinux-rdf4j/bin/python --tmp mytemp:/home/steve/Documents/ART-002/GitRepos/proj1/.tox/py37-mylinux-rdf4j/tmp
Why show the prefix path if it's not actually conveyed? I ask because I don't presume that there is no good reason. I just don't know it...
MTIA for any insights, feedback. And yes, I'm hoping to update to tox 4 'soon' :-). Tox is quite powerful, useful. Much appreciated.