Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: try to find python after python3 #1907

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/find-python.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ PythonFinder.prototype = {
win: win,
pyLauncher: 'py.exe',
winDefaultLocations: [
path.join(process.env.SystemDrive || 'C:', 'Python27', 'python.exe'),
path.join(process.env.SystemDrive || 'C:', 'Python37', 'python.exe')
path.join(process.env.SystemDrive || 'C:', 'Python37', 'python.exe'),
path.join(process.env.SystemDrive || 'C:', 'Python27', 'python.exe')
],

// Logs a message at verbose level, but also saves it to be displayed later
Expand Down Expand Up @@ -88,14 +88,14 @@ PythonFinder.prototype = {
arg: this.env.PYTHON
},
{
before: () => { this.addLog('checking if "python" can be used') },
before: () => { this.addLog('checking if "python3" can be used') },
check: this.checkCommand,
arg: 'python'
arg: 'python3'
},
{
before: () => { this.addLog('checking if "python3" can be used') },
before: () => { this.addLog('checking if "python" can be used') },
check: this.checkCommand,
arg: 'python3'
arg: 'python'
},
{
before: () => { this.addLog('checking if "python2" can be used') },
Expand Down
2 changes: 1 addition & 1 deletion test/test-find-python.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ test('find python - no python, use python launcher', function (t) {
test('find python - no python, no python launcher, good guess', function (t) {
t.plan(4)

var re = /C:[\\/]Python27[\\/]python[.]exe/
var re = /C:[\\/]Python37[\\/]python[.]exe/
var f = new TestPythonFinder(null, done)
f.win = true

Expand Down