Skip to content

Commit 965361e

Browse files
committed
build: use the same python executable to run configure and gyp
Otherwise we would end up using python 2 to run actions in the gyp config if that's the system default.
1 parent f6b2893 commit 965361e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

configure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,6 +1925,7 @@ def make_bin_override():
19251925

19261926
# Forward OSS-Fuzz settings
19271927
output['variables']['ossfuzz'] = b(options.ossfuzz)
1928+
output['variables']['python_exec'] = sys.executable
19281929

19291930
# variables should be a root level element,
19301931
# move everything else to target_defaults

node.gyp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
'node_lib_target_name%': 'libnode',
2828
'node_intermediate_lib_type%': 'static_library',
2929
'node_builtin_modules_path%': '',
30+
'python_exec': 'python',
3031
# We list the deps/ files out instead of globbing them in js2c.py since we
3132
# only include a subset of all the files under these directories.
3233
# The lengths of their file names combined should not exceed the
@@ -790,7 +791,7 @@
790791
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
791792
'process_outputs_as_sources': 1,
792793
'action': [
793-
'python',
794+
'<(python_exec)',
794795
'tools/mkssldef.py',
795796
'<@(mkssldef_flags)',
796797
'-o',
@@ -816,7 +817,7 @@
816817
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
817818
],
818819
'action': [
819-
'python',
820+
'<(python_exec)',
820821
'tools/js2c.py',
821822
'--directory',
822823
'lib',

0 commit comments

Comments
 (0)