From d5f13f6c0803e328cd588c3c402f50d7891292fb Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 28 Jun 2012 01:07:42 +0200 Subject: [PATCH] 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. --- Makefile | 2 +- configure | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index adaed6f1e70..51a8b3ea92c 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/configure b/configure index df18ba5e31b..460b3f11004 100755 --- a/configure +++ b/configure @@ -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)