-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Prefer py launcher to suffixed Pythons found on PATH on Windows #250
Comments
@theacodes May be worth labeling this as |
As someone who has been poking around looking for place to be useful, I haven't touched this issue because I don't have confidence that a change isn't going to break someone else's workflow. It's a simple change in the code, but I'd defer to someone with a better knowledge of the various Windows combinations of virtual environments and anaconda, chocolately, and/or the py launcher. See, for example, the discussions in #231. And tox isn't a useful point of reference (which it sometimes is) for a quick fix. They follow PEP 514 and hit the Windows registry. (See https://github.com/tox-dev/tox/tree/master/src/tox/interpreters/windows.) Switching to following PEP 514 seems like the better plan overall, to be honest. |
We do use PEP 514 by virtue of using the Python launcher. We're just not
doing it in the right order right now.
…On Thu, Sep 26, 2019 at 6:30 AM Matt VanEseltine ***@***.***> wrote:
As someone who has been poking around looking for place to be useful, I
haven't touched this issue because I don't have confidence that a change
isn't going to break someone else's workflow. It's a simple change in the
code, but I'd defer to someone with a better knowledge of the various
Windows combinations of virtual environments and anaconda, chocolately,
and/or the py launcher. Cf., for example, #231
<#231>
And tox isn't a useful point of reference (which it sometimes is) for a
quick fix. They follow PEP 514 and hit the Windows registry. (See
https://github.com/tox-dev/tox/tree/master/src/tox/interpreters/windows.)
Switching to following PEP 514 seems like the better plan overall, to be
honest.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#250>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB5I46LRRUHE5PA4UL3S53QLS2PPANCNFSM4IYFDWHA>
.
|
I think that all those heuristics are good and nice until there is some scenario where they fail. there would ideally be a way to directly specify which Python interpreter to use per version. That way should be optional and only needed in the rare case the heuristic way is failing. |
It's already (mostly) possible to do that by putting a binary on your |
This is not great for a couple of reasons:
|
@omry The issue with specifying it as a specific path is that isn't portable. If you and I are on the same project with the same nox file, we may have different configurations. Do I misunderstand your suggestion? |
@crwilcox:
For me, the problem I am trying to solve is specific to running in CI environment. I can easily change the environment variables there. |
Please don't let the lack of consensus around my suggestion stop progress on this issue. |
IIUC the main goal of this issue is to use more "canonical" python installations first before searching around for others. The implementation would be to use the |
Migrated from #233 (comment).
How would this feature be useful?
Give a more consistent experience by delegating to the system-managed Python on Windows.
In my specific case it would make using nox in GitHub Actions easier since it would not resolve to
C:\ProgramData\Chocolatey\bin\python2.7.exe
instead of thepy
launcher.Describe the solution you'd like
On Windows, we should search for and prefer to invoke a
py
launcher for the requested version of Python before searchingPATH
for version-suffixed Python executables. The latter is uncommon on Windows and may resolve to MinGW or Cygwin-packaged versions which are less likely to be the target Pythons.Describe alternatives you've considered
PATH
The text was updated successfully, but these errors were encountered: