Skip to content

Commit 2146da5

Browse files
committed
build: cache python exec path on configure
1 parent 3cbaabc commit 2146da5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

configure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,9 @@ def gcc_version_ge(version_checked):
11561156
return False
11571157
return True
11581158

1159+
def configure_python(o):
1160+
o['variables']['python_exec_path'] = sys.executable
1161+
11591162
def configure_node_lib_files(o):
11601163
o['variables']['node_library_files'] = SearchFiles('lib', 'js')
11611164

@@ -1905,6 +1908,7 @@ def make_bin_override():
19051908
flavor_params['flavor'] = options.dest_os
19061909
flavor = GetFlavor(flavor_params)
19071910

1911+
configure_python(output)
19081912
configure_node(output)
19091913
configure_node_lib_files(output)
19101914
configure_napi(output)

node.gyp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@
790790
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
791791
'process_outputs_as_sources': 1,
792792
'action': [
793-
'python',
793+
'<(python_exec_path)',
794794
'tools/mkssldef.py',
795795
'<@(mkssldef_flags)',
796796
'-o',
@@ -816,7 +816,7 @@
816816
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
817817
],
818818
'action': [
819-
'python',
819+
'<(python_exec_path)',
820820
'tools/js2c.py',
821821
'--directory',
822822
'lib',

0 commit comments

Comments
 (0)