From 2146da52313d06f1a099ed7247c2adc08a264514 Mon Sep 17 00:00:00 2001 From: legendecas Date: Tue, 20 Jul 2021 18:00:19 +0800 Subject: [PATCH] build: cache python exec path on configure --- configure.py | 4 ++++ node.gyp | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index 1e9ee8adf3cc68..cbbb87bf170014 100755 --- a/configure.py +++ b/configure.py @@ -1156,6 +1156,9 @@ def gcc_version_ge(version_checked): return False return True +def configure_python(o): + o['variables']['python_exec_path'] = sys.executable + def configure_node_lib_files(o): o['variables']['node_library_files'] = SearchFiles('lib', 'js') @@ -1905,6 +1908,7 @@ def make_bin_override(): flavor_params['flavor'] = options.dest_os flavor = GetFlavor(flavor_params) +configure_python(output) configure_node(output) configure_node_lib_files(output) configure_napi(output) diff --git a/node.gyp b/node.gyp index 9c3ff581d64b59..1492927c2523d9 100644 --- a/node.gyp +++ b/node.gyp @@ -790,7 +790,7 @@ 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'], 'process_outputs_as_sources': 1, 'action': [ - 'python', + '<(python_exec_path)', 'tools/mkssldef.py', '<@(mkssldef_flags)', '-o', @@ -816,7 +816,7 @@ '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc', ], 'action': [ - 'python', + '<(python_exec_path)', 'tools/js2c.py', '--directory', 'lib',