Skip to content

Commit

Permalink
build: use the same python executable to run configure and gyp
Browse files Browse the repository at this point in the history
Otherwise we would end up using python 2 to run actions in the gyp
config if that's the system default.
  • Loading branch information
joyeecheung committed Jul 23, 2021
1 parent f6b2893 commit 4b551d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions configure.py
Expand Up @@ -1925,6 +1925,7 @@ def make_bin_override():

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

# variables should be a root level element,
# move everything else to target_defaults
Expand Down
6 changes: 4 additions & 2 deletions node.gyp
Expand Up @@ -27,6 +27,7 @@
'node_lib_target_name%': 'libnode',
'node_intermediate_lib_type%': 'static_library',
'node_builtin_modules_path%': '',
'python_exec': 'python',
# We list the deps/ files out instead of globbing them in js2c.py since we
# only include a subset of all the files under these directories.
# The lengths of their file names combined should not exceed the
Expand Down Expand Up @@ -784,13 +785,14 @@
{
'action_name': 'mkssldef',
'inputs': [
'<(python_exec)',
'deps/openssl/openssl/util/libcrypto.num',
'deps/openssl/openssl/util/libssl.num',
],
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
'process_outputs_as_sources': 1,
'action': [
'python',
'<(python_exec)',
'tools/mkssldef.py',
'<@(mkssldef_flags)',
'-o',
Expand All @@ -816,7 +818,7 @@
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
],
'action': [
'python',
'<(python_exec)',
'tools/js2c.py',
'--directory',
'lib',
Expand Down

0 comments on commit 4b551d6

Please sign in to comment.