This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Confusing virtualenv interpolation tox 3.24 #2330
Labels
bug:normal
affects many people or has quite an impact
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.
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:
MTIA for any insights, feedback. And yes, I'm hoping to update to tox 4 'soon' :-). Tox is quite powerful, useful. Much appreciated.
The text was updated successfully, but these errors were encountered: