node-gyp
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -75,7 +75,17 @@ | ||
} | ||
log.verbose('check python version', '`python --version` returned: %j', stderr) | ||
var version = stderr.trim().replace(/[^\d\.]+/g, '') | ||
if (semver.lt(version, '3.0.0')) { | ||
var numDots = 0 | ||
version.replace(/\./g, function () { | ||
numDots++ | ||
}) | ||
while (numDots < 2) { | ||
version += '.0' | ||
numDots++ | ||
} | ||
log.verbose('check python version', 'using version %j to check', version) | ||
if (semver.gte(version, '2.5.0') && semver.lt(version, '3.0.0')) { | ||
getNodeDir() | ||
} else { | ||
failPython3() | ||
failPythonVersion(version) | ||
} | ||
@@ -90,6 +100,6 @@ }) | ||
function failPython3 () { | ||
function failPythonVersion (badVersion) { | ||
callback(new Error('Python executable "' + python | ||
+ '" is Python 3, which is not supported.\n' | ||
+ 'You can set the PYTHON env variable to point to a Python 2 interpreter.')) | ||
+ '" is v' + badVersion + ', which is not supported by gyp.\n' | ||
+ 'You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.')) | ||
} | ||
@@ -96,0 +106,0 @@ |
{ "name": "node-gyp" | ||
, "description": "Node.js native addon build tool" | ||
, "keywords": [ "native", "addon", "module", "c", "c++", "bindings", "gyp" ] | ||
, "version": "0.5.2" | ||
, "version": "0.5.3" | ||
, "installVersion": 9 | ||
@@ -6,0 +6,0 @@ , "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)" |
915498
1074