Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
build: use proper python interpreter
Browse files Browse the repository at this point in the history
Make configure start gyp with the same python interpreter that is used to
run configure itself.

Fixes an issue where configure fails with a SyntaxError because the user
has multiple python binaries on his $PATH and the default one is too old.
  • Loading branch information
bnoordhuis committed Jun 27, 2012
1 parent 9e72b7b commit d5f13f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -31,7 +31,7 @@ out/Debug/node:
$(MAKE) -C out BUILDTYPE=Debug

out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/common.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
tools/gyp_node -f make
$(PYTHON) tools/gyp_node -f make

install: all
out/Release/node tools/installer.js install $(DESTDIR)
Expand Down
7 changes: 4 additions & 3 deletions configure
Expand Up @@ -400,7 +400,8 @@ write('config.mk', "# Do not edit. Generated by the configure script.\n" +
("BUILDTYPE=%s\n" % ('Debug' if options.debug else 'Release')))

if os.name == 'nt':
subprocess.call(['python', 'tools/gyp_node', '-f', 'msvs',
'-G', 'msvs_version=2010'])
gyp_args = ['-f', 'msvs', '-G', 'msvs_version=2010']
else:
subprocess.call(['tools/gyp_node', '-f', 'make'])
gyp_args = ['-f', 'make']

subprocess.call([sys.executable, 'tools/gyp_node'] + gyp_args)

0 comments on commit d5f13f6

Please sign in to comment.