build: use proper python interpreter

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.
This commit is contained in:
Ben Noordhuis 2012-06-28 01:07:42 +02:00
parent 9e72b7b65c
commit d5f13f6c08
2 changed files with 5 additions and 4 deletions

View File

@ -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)

7
configure vendored
View File

@ -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)