Description
Hi, thanks for the great tool !
I am the author of https://github.com/smarie/python-pytest-cases, and I recently switched my nox virtual environment backend from conda to virtualenv. This requires direct installation of python (not through conda anymore)
I tried to use your action but it does not behave exactly as setup-python :
- this fails: https://github.com/smarie/python-pytest-cases/actions/runs/6371035936/job/17292643321
- this works: https://github.com/smarie/python-pytest-cases/actions/runs/6371035936/job/17292644022
I suspect that there is a missing registration with the PATH, I am currently experimenting about that. If I confirm that this solves the issue, it could probably be a great additional parameter to add in order to be as close as possible with the behaviour of setup-python
EDIT: adding to PATH does not solve the issue as shown here: https://github.com/smarie/python-pytest-cases/actions/runs/6371356100/job/17293226935#step:4:10
nox > Command /opt/hostedtoolcache/Python/3.9.18/x64/bin/python -m virtualenv /home/<...> -p python3.5 failed with exit code 1:
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.5'Maybe virtualenv uses a different way to see the list of python versions available ? I'll have to spend more time to understand. Maybe there is something to register with py
Activity
MatteoH2O1999 commentedon Oct 2, 2023
The problem with this is that this action actually calls setup-python to perform the update of the environment variables.
Just to confirm, try to add this step before calling nox and remove the one adding python to PATH:
Trying to debug MatteoH2O1999/setup-python#28
MatteoH2O1999 commentedon Oct 3, 2023
As you can see here the correct python is actually detected. This looks more like a nox configuration problem to me
smarie commentedon Oct 3, 2023
Actually
noxis just callingvirtualenv, which uses its own strategies to detect available python versions. I suspect that this is where the link is missing. I will rerun with explicit virtualenv callAnother stab at MatteoH2O1999/setup-python#28
More verbosity resolving MatteoH2O1999/setup-python#28
MatteoH2O1999 commentedon Oct 3, 2023
Just checked it in a fork. The problem is virtualenv for Python 3.9 is no longer compatible with 3.5 and 2.7.
While querying the executables it uses syntax that 3.5 and 2.7 do not support anymore.
Try adding
virtualenv==20.15.1to your requirements file and it should no longer be an issue.Closing this as it is seems to me not to be caused by this action.
Feel free to reopen if you still think this action is causing the issue.
Testing solution from MatteoH2O1999/setup-python#28
smarie commentedon Oct 3, 2023
Thanks @MatteoH2O1999 ! I'll test this
smarie commentedon Oct 4, 2023
It seems that your solution works !
https://github.com/smarie/python-pytest-cases/actions/runs/6397701763
Thanks @MatteoH2O1999 , I really appreciated your help
[-]Python not found - probably not added automatically to PATH ?[/-][+]Python not found by virtualenv[/+]