Skip to content

Commit 4b551d6

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 4b551d6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-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: 4 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
@@ -784,13 +785,14 @@
784785
{
785786
'action_name': 'mkssldef',
786787
'inputs': [
788+
'<(python_exec)',
787789
'deps/openssl/openssl/util/libcrypto.num',
788790
'deps/openssl/openssl/util/libssl.num',
789791
],
790792
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
791793
'process_outputs_as_sources': 1,
792794
'action': [
793-
'python',
795+
'<(python_exec)',
794796
'tools/mkssldef.py',
795797
'<@(mkssldef_flags)',
796798
'-o',
@@ -816,7 +818,7 @@
816818
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
817819
],
818820
'action': [
819-
'python',
821+
'<(python_exec)',
820822
'tools/js2c.py',
821823
'--directory',
822824
'lib',

0 commit comments

Comments
 (0)