build: use bin override if no python in PATH

On systems with no "python" in the PATH, e.g. FreeBSD, we should always
create a python symlink in get_bin_override().

PR-URL: https://github.com/nodejs/node/pull/16241
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
Bradley T. Hughes
2017-10-16 12:33:47 +00:00
committed by Myles Borins
parent d4b3b633d8
commit ac1beb0fb0

4
configure vendored
View File

@@ -1325,7 +1325,9 @@ def get_bin_override():
# sys.executable. This directory will be prefixed to the PATH, so that
# other tools that shell out to `python` will use the appropriate python
if os.path.realpath(which('python')) == os.path.realpath(sys.executable):
which_python = which('python')
if (which_python and
os.path.realpath(which_python) == os.path.realpath(sys.executable)):
return
bin_override = os.path.abspath('out/tools/bin')