diff options
Diffstat (limited to 'deps/npm/node_modules/node-gyp/lib/configure.js')
-rw-r--r-- | deps/npm/node_modules/node-gyp/lib/configure.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js index e101a315a..268c33625 100644 --- a/deps/npm/node_modules/node-gyp/lib/configure.js +++ b/deps/npm/node_modules/node-gyp/lib/configure.js @@ -1,4 +1,3 @@ - module.exports = exports = configure /** @@ -14,6 +13,7 @@ var fs = require('graceful-fs') , semver = require('semver') , mkdirp = require('mkdirp') , cp = require('child_process') + , extend = require('util')._extend , spawn = cp.spawn , execFile = cp.execFile , win = process.platform == 'win32' @@ -73,7 +73,9 @@ function configure (gyp, argv, callback) { } function checkPythonVersion () { - var env = { TERM: 'dumb', PATH: process.env.PATH }; + var env = extend({}, process.env); + env.TERM = 'dumb'; + execFile(python, ['-c', 'import platform; print(platform.python_version());'], { env: env }, function (err, stdout) { if (err) { return callback(err) @@ -88,7 +90,7 @@ function configure (gyp, argv, callback) { log.silly('stripping "rc" identifier from version') version = version.replace(/rc(.*)$/ig, '') } - var range = semver.Range('>=2.5.0 <3.0.0'); + var range = semver.Range('>=2.5.0 <3.0.0') if (range.test(version)) { getNodeDir() } else { @@ -210,7 +212,7 @@ function configure (gyp, argv, callback) { variables.copy_dev_lib = !gyp.opts.nodedir // disable -T "thin" static archives by default - variables.standalone_static_library = gyp.opts.thin ? 0 : 1; + variables.standalone_static_library = gyp.opts.thin ? 0 : 1 // loop through the rest of the opts and add the unknown ones as variables. // this allows for module-specific configure flags like: @@ -311,6 +313,7 @@ function configure (gyp, argv, callback) { argv.push('-Dnode_root_dir=' + nodeDir) argv.push('-Dmodule_root_dir=' + process.cwd()) argv.push('--depth=.') + argv.push('--no-parallel') // tell gyp to write the Makefile/Solution files into output_dir argv.push('--generator-output', output_dir) |