lib: drop "-2" flag for "py.exe" launcher

Now that node-gyp supports both Python 2 and Python 3,
We don't need to explicitly try to find only Python 2.

Fixes: https://github.com/nodejs/node-gyp/issues/2130
Refs: https://docs.python.org/3/using/windows.html#launcher
PR-URL: https://github.com/nodejs/node-gyp/pull/2131
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
This commit is contained in:
DeeDeeG 2020-05-15 01:38:58 -04:00 committed by Rod Vagg
parent 741ab096d5
commit c255ffbf6a
No known key found for this signature in database
GPG key ID: C273792F7D83545D
2 changed files with 4 additions and 10 deletions

View file

@ -146,14 +146,13 @@ test('find python - no python2, no python, unix', function (t) {
})
test('find python - no python, use python launcher', function (t) {
t.plan(4)
t.plan(3)
var f = new TestPythonFinder(null, done)
f.win = true
f.execFile = function (program, args, opts, cb) {
if (program === 'py.exe') {
t.notEqual(args.indexOf('-2'), -1)
t.notEqual(args.indexOf('-c'), -1)
return cb(null, 'Z:\\snake.exe')
}