| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@digitalinfinity what's the use case? Are you using a shebang simulating mechanism? IMHO on windows we should use sys.executable and err if it's not v2.x. |
Sorry, something went wrong.
|
Or you can call https://github.com/nodejs/node/blob/master/tools/msvs/find_python.cmd (Windows FTW!) BTW in the new "Opinionated dev shell" I'm writing we won't need that ;) |
Sorry, something went wrong.
|
There is a discrepancy between the paths derived through which vs paths derived through sys.executable and it looks like os.path.realpath doesn't canonicalize it. I ran into it while running vcbuild on my machine because I have python.exe in C:\Python27 but my PATH environment variable contains C:\python27. I could work around it by updating my PATH but I figure it would be better for configure to be resilient to this difference. As an aside, I'm a python neophyte so if there is a better way in python to do this, happy to update the PR Edit: formatting |
Sorry, something went wrong.
|
So vcbuild already works hard to figure out where a suitible python resides, so there's no need for the which trick (POSIX uses that because the shebang - #!/bin/sh might not resolve to the right python). I'll push a suggestion. |
Sorry, something went wrong.
|
/cc @nodejs/platform-windows |
Sorry, something went wrong.
|
I like your suggestion better- I'd just add a check in bin_override to error out if it's Windows then, if we never expect it to be called? |
Sorry, something went wrong.
There was a problem hiding this comment.
differnt -> different (@refack)
Sorry, something went wrong.
There was a problem hiding this comment.
Aside: the function is not well-named. It suggests it just looks up something but it does all kinds of things as a side effect. Maybe make_bin_override()?
Sorry, something went wrong.
|
Thanks @refack - the new changes look good to me! |
Sorry, something went wrong.
|
I won't ✔️ my own code, so we need a 3rd party 😃 |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Does WSL's sys.platform identify as win32?
Sorry, something went wrong.
There was a problem hiding this comment.
It says linux2
Sorry, something went wrong.
PR-URL: nodejs#16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: #16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: #16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: #16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: nodejs/node#16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: nodejs/node#16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: #16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: #16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: #16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: nodejs/node#16460 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
| Back | FazBrowse Home | New Git URL |
The check to validate whether the current python process is the same as
the one resolved from the current path fails if the paths differ by case
which can happen on an operating system with case insensitive file
system behavior like Windows. Canonicalize it by converting both to
lower case if running on Windows.
Checklist
Affected core subsystem(s)
build