mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 19:17:09 +03:00
node-gyp 5.x still accepts Python 2.6
This commit is contained in:
parent
f8fecadcbb
commit
fef2de59a4
@ -60,7 +60,7 @@ This version enables you to install multiple Atom versions in parallel. It has b
|
||||
but should be compatible with other Linux distributions.
|
||||
|
||||
1. Install dependencies (on Ubuntu): `sudo apt install git gconf2 gconf-service libgtk2.0-0 libudev1 libgcrypt20 libnotify4 libxtst6 libnss3 python3 gvfs-bin xdg-utils libcap2`
|
||||
1. (If the `python3` package isn't available, or is too old (Python 3 should be >= 3.5), either `python2` or `python` will work in its place.)
|
||||
1. (If the `python3` package isn't available, or is too old (Python 3 should be >= 3.5), either `python2` or `python` (2.6 or 2.7) will work in its place.)
|
||||
2. Download `atom-amd64.tar.gz` from the [Atom releases page](https://github.com/atom/atom/releases/latest).
|
||||
3. Run `tar xf atom-amd64.tar.gz` in the directory where you want to extract the Atom folder.
|
||||
4. Launch Atom using the installed `atom` command from the newly extracted directory.
|
||||
|
@ -55,9 +55,11 @@ function verifyPython() {
|
||||
//
|
||||
// TODO: If this repo ships a newer version of node-gyp (v6.x or later), please update this script.
|
||||
// (Currently, the build scripts and apm each depend on npm v6.14, which depends on node-gyp v5.)
|
||||
// node-gyp v5.x looks for python first, then python2, then python3.
|
||||
// node-gyp v6.x looks for python3 first, then python, then python2.)
|
||||
// Also, node-gyp v7.x stopped using the "-2" flag for "py.exe",
|
||||
// Differences between major versions of node-gyp:
|
||||
// node-gyp 5.x looks for python, then python2, then python3.
|
||||
// node-gyp 6.x looks for python3, then python, then python2.)
|
||||
// node-gyp 5.x accepts Python ^2.6 || >= 3.5, node-gyp 6+ only accepts Python == 2.7 || >= 3.5.
|
||||
// node-gyp 7.x stopped using the "-2" flag for "py.exe",
|
||||
// so as to allow finding Python 3 as well, not just Python 2.
|
||||
// https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md#v700-2020-06-03
|
||||
|
||||
@ -80,9 +82,10 @@ function verifyPython() {
|
||||
if (prependFlag) {
|
||||
// prependFlag is an optional argument,
|
||||
// used to prepend "-2" for the "py.exe" launcher.
|
||||
// TODO: Refactor by eliminating prependFlag
|
||||
// once apm updates to node-gyp v7.x or newer, in which
|
||||
// the "-2" flag has been dropped for invoking the py launcher.
|
||||
//
|
||||
// TODO: Refactor this script by eliminating "prependFlag"
|
||||
// once we update to node-gyp v7.x or newer;
|
||||
// the "-2" flag is not used in node-gyp v7.x.
|
||||
allFlags.unshift(prependFlag);
|
||||
}
|
||||
|
||||
@ -106,7 +109,7 @@ function verifyPython() {
|
||||
let majorVersion = Number(versionComponents[0]);
|
||||
let minorVersion = Number(versionComponents[1]);
|
||||
if (
|
||||
(majorVersion === 2 && minorVersion === 7) ||
|
||||
(majorVersion === 2 && minorVersion >= 6) ||
|
||||
(majorVersion === 3 && minorVersion >= 5)
|
||||
) {
|
||||
usablePythonWasFound = true;
|
||||
@ -132,7 +135,7 @@ function verifyPython() {
|
||||
throw new Error(
|
||||
`NODE_GYP_FORCE_PYTHON is set to: "${binary}", but this is not a valid Python.\n` +
|
||||
'Please set NODE_GYP_FORCE_PYTHON to something valid, or unset it entirely.\n' +
|
||||
'(Python 2.7 or 3.5+ is required to build Atom.)\n'
|
||||
'(Python 2.6, 2.7 or 3.5+ is required to build Atom.)\n'
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -161,7 +164,7 @@ function verifyPython() {
|
||||
} else {
|
||||
throw new Error(
|
||||
`\n${triedLog}\n` +
|
||||
'Python 2.7 or 3.5+ is required to build Atom.\n' +
|
||||
'Python 2.6, 2.7 or 3.5+ is required to build Atom.\n' +
|
||||
'verify-machine-requirements.js was unable to find such a version of Python.\n' +
|
||||
"Set the PYTHON env var to e.g. 'C:/path/to/Python27/python.exe'\n" +
|
||||
'if your Python is installed in a non-default location.\n'
|
||||
|
Loading…
Reference in New Issue
Block a user