(core) Upgrade to Python 3.11

Summary: Replaced mentions of Python 3.9 with 3.11

Test Plan: this

Reviewers: paulfitz, georgegevoian

Reviewed By: paulfitz, georgegevoian

Subscribers: dsagal, georgegevoian, paulfitz

Differential Revision: https://phab.getgrist.com/D3980
This commit is contained in:
Alex Hall
2023-08-04 17:59:52 +02:00
parent 6416994c22
commit 5dfa9a542c
8 changed files with 23 additions and 19 deletions

View File

@@ -1021,9 +1021,13 @@ function findPython(command: string|undefined, preferredVersion?: string) {
}
}
// Fall back on system python.
return which.sync(preferredVersion === '2' ? 'python2' : 'python3', {nothrow: true})
|| which.sync(preferredVersion === '2' ? 'python2.7' : 'python3.9', {nothrow: true})
|| which.sync('python');
const systemPrefs = preferredVersion === '2' ? ['2.7', '2', ''] : ['3.11', '3.10', '3.9', '3', ''];
for (const version of systemPrefs) {
const pythonPath = which.sync(`python${version}`, {nothrow: true});
if (pythonPath) {
return pythonPath;
}
}
}
/**