build: try “python3” as a last resort for 3.x#35983
build: try “python3” as a last resort for 3.x#35983oleavr wants to merge 1 commit intonodejs:masterfrom
Conversation
So that Xcode's Python 3 gets picked up.
|
This could cause us to launch with a Python 3.{0,1,2,3,4} that is not tested and would probably fail. There are tons of macOS users that are using this code as is. Please try |
Why would that be a bad thing? I think as a fallback this should be perfectly acceptable. |
Why take the support risk for a change that is not needed? |
| command -v python3.7 >/dev/null && exec python3.7 "$0" "$@" | ||
| command -v python3.6 >/dev/null && exec python3.6 "$0" "$@" | ||
| command -v python3.5 >/dev/null && exec python3.5 "$0" "$@" | ||
| command -v python3 >/dev/null && exec python3 "$0" "$@" |
There was a problem hiding this comment.
@cclauss Would this be acceptable?
| command -v python3 >/dev/null && exec python3 "$0" "$@" | |
| command -v python3 >/dev/null && python3 -c 'import sys; assert sys.version_info >= (3,5)' > /dev/null && exec python3 "$0" "$@" |
There was a problem hiding this comment.
Although I guess I kind of wonder if this actually covers anything we don't already cover.
@oleavr It would be very useful to know the output of python3 --version on your system (assuming this PR is a bug fix for your own setup).
There was a problem hiding this comment.
We could also just print a warning from configure.py itself, right? We’re already doing that for a the compiler/assembler/etc. versions as well
There was a problem hiding this comment.
@Trott The output is:
% python3 --version
Python 3.8.2
This is the Xcode-provided Python 3 on a macOS system. Xcode doesn't create a python-3.8 symlink in /usr/bin, there's only /usr/bin/python3 (which is not a symlink, but a magic forwarder program that locates the Xcode installation and pivots to the appropriate binary there).
cclauss
left a comment
There was a problem hiding this comment.
LGTM... All my Macs use brew so I did not properly understand the issue. Thanks for clarifying.
|
Landed in 0ed9961...fb24f6e |
So that Xcode's Python 3 gets picked up. PR-URL: #35983 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
So that Xcode's Python 3 gets picked up. PR-URL: #35983 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
So that Xcode's Python 3 gets picked up. PR-URL: #35983 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
So that Xcode's Python 3 gets picked up. PR-URL: #35983 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
So that Xcode's Python 3 gets picked up. PR-URL: #35983 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
So that Xcode's Python 3 gets picked up.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes