Skip to content

Commit

Permalink
build: cache python exec path on configure
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Jul 20, 2021
1 parent 3cbaabc commit 2146da5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions configure.py
Expand Up @@ -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')

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions node.gyp
Expand Up @@ -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',
Expand All @@ -816,7 +816,7 @@
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
],
'action': [
'python',
'<(python_exec_path)',
'tools/js2c.py',
'--directory',
'lib',
Expand Down

0 comments on commit 2146da5

Please sign in to comment.