Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: cache python exec path on configure #39465

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
build: override python executable path on configure
  • Loading branch information
legendecas committed Jul 26, 2021
commit 505fe77958b291f3e3416c0a7a4036e5cdd0eaea
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ out/Makefile: config.gypi common.gypi node.gyp \
# and included in config.gypi
config.gypi: configure configure.py src/node_version.h
@if [ -x config.status ]; then \
./config.status; \
export PATH="$(NO_BIN_OVERRIDE_PATH)" && ./config.status; \
else \
echo Missing or stale $@, please run ./$<; \
exit 1; \
4 changes: 4 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
@@ -2010,6 +2010,10 @@ def make_bin_override():
if options.compile_commands_json:
gyp_args += ['-f', 'compile_commands_json']

# override the variable `python` defined in common.gypi
if bin_override is not None:
gyp_args += ['-Dpython=' + sys.executable]

# pass the leftover positional arguments to GYP
gyp_args += args

4 changes: 2 additions & 2 deletions node.gyp
Original file line number Diff line number Diff line change
@@ -790,7 +790,7 @@
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
'process_outputs_as_sources': 1,
'action': [
'python',
'<(python)',
'tools/mkssldef.py',
'<@(mkssldef_flags)',
'-o',
@@ -816,7 +816,7 @@
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
],
'action': [
'python',
'<(python)',
'tools/js2c.py',
'--directory',
'lib',