summaryrefslogtreecommitdiff
path: root/configure.py
diff options
context:
space:
mode:
authorlegendecas <legendecas@gmail.com>2021-07-20 18:00:19 +0800
committerlegendecas <legendecas@gmail.com>2021-07-30 01:20:00 +0800
commit9b5aa8d99eae07831407cf4a6ffda079c42e19bf (patch)
tree29bb700e7e2aae0c3171c9c2b0a016a64638a61f /configure.py
parentbd33fdfadf1ffd79c99b4057bd2dc32c520e94d2 (diff)
downloadnode-new-9b5aa8d99eae07831407cf4a6ffda079c42e19bf.tar.gz
build: override python executable path on configure
PR-URL: https://github.com/nodejs/node/pull/39465 Fixes: https://github.com/nodejs/node/issues/39408 Fixes: https://github.com/nodejs/node/issues/39456 Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index a4c4d26987..9327d6e5f5 100755
--- a/configure.py
+++ b/configure.py
@@ -2005,6 +2005,10 @@ else:
if options.compile_commands_json:
gyp_args += ['-f', 'compile_commands_json']
+# override the variable `python` defined in common.gypi
+if bin_override is not None:
+ gyp_args += ['-Dpython=' + sys.executable]
+
# pass the leftover positional arguments to GYP
gyp_args += args