-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--extra-python does not replace Python version by full path on Windows #412
Comments
Hi @hotenov, thanks for filing this issue! I believe that what you are describing is expected behavior, because Instead you should be passing the same full path to both IMO it would be nice to have a shorthand |
Hi Claudio! @cjolowicz Thanks for quick response and amazing Hypermodern articles ;) I think I understand now, that combination So, I was confused by example in documentation and word "to replace": Because I expected that it will be replacing interpreter Can you explain for dummy when such combination (replacement) will work? UPD: maybe, in docs should be different versions, for example 3.8.2 and replace with 3.8.10, no? |
Let me clarify this with an example. Suppose your Noxfile has sessions with these interpreters: If you pass If you pass If you pass only The |
👍🏻 Excellent examples! I think, you should add them into the docs :) All clear, now. Thanks! I was hoping that option I have to wait when you add this feature or pyenv-win add correct version detection (and several local versions on Windows). Who is faster?! : ) For now, I close this issue. |
Glad this helped. Have you considered using the official Python binaries on Windows, by the way? Nox should work with them out of the box. |
Yes. I have one :) and Nox picks it up smoothly (with it, I found out that pyenv's installings invisible at all for Nox). |
Describe the bug
I use pyenv on Windows (pyenv-win) which is not supported by nox (as I noticed :)
But I found two workarounds for my local Nox running with installed Python versions via pyenv.
First, I can pass full paths to installed Pythons in my separate (local) noxfile:
and use nox CLI with command
nox -f noxfile.local.py
. It works, but one more file will need to be maintained (coping from production noxfile.py)Second, Later I found in docs amazing argument in Nox CLI
--extra-python
"That's what I need", I thought. But in my case It does not work it was intended as. At least on Windows.
I tried this command for session with following decorator
@nox.session(python=["3.8.2"])
:Nox tells me "Python interpreter 3.8.2 not found". Some of you would say: "Use double backslash
\\
power". I tried. The result is the same.The most interesting thing is that
--extra-pythons
argument works fine, i.e command:will run all sessions with Python specified in noxfile.py and with all Pythons passed in command (even without backslash escaping in file path)
What am I doing wrong? Or it's really bug?
I did not find something similar in Open bugs. Should I try to reproduce this issue on Ubuntu with pyenv as well?
My installed packages on Windows 10 20H2 19042.868:
How to reproduce
nox --python <version> --extra-python "<full_path_to_python>"
Expected behavior
Nox runs session with specified
--extra-python
Python interpreter creating separate virtual environment in .nox folder with full path session suffixThe text was updated successfully, but these errors were encountered: