diff options
author | Richard Lau <rlau@redhat.com> | 2021-05-06 01:48:14 +0300 |
---|---|---|
committer | Richard Lau <rlau@redhat.com> | 2021-05-10 17:34:12 +0300 |
commit | 16982b6c4d7c384c69b25bc2569eb76d5fbeb4c1 (patch) | |
tree | f5d451cb08f5dad84e82f7dfdf896242c8c613f9 /BUILDING.md | |
parent | 63155c95ba6fdb8f5c93223a786056308d302f2f (diff) |
build: remove dependency on `distutils.spawn`
Debian based packages of Python 3 do not include `distutils.spawn` and
require an additional apt package to be installed (`python3-distutils`).
Replace use of `distutils.spawn` with `shutil.which`, available in all
versions of Python currently allowed by our configure scripts.
For the `configure` script only, fall back to `distutils.spawn` to allow
friendlier error messages when run on older unsupported versions of
Python (e.g. 2.7).
`configure.py` also uses `distutils.version` -- this appears to be
available in Debian packaged Python 3 without installing
`python3-distutils` so has been left as-is.
PR-URL: https://github.com/nodejs/node/pull/38600
Refs: https://github.com/nodejs/node/issues/30189
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'BUILDING.md')
-rw-r--r-- | BUILDING.md | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/BUILDING.md b/BUILDING.md index e190abe70db..973c87b73ea 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -246,8 +246,6 @@ Installation via Linux package manager can be achieved with: FreeBSD and OpenBSD users may also need to install `libexecinfo`. -Python 3 users may also need to install `python3-distutils`. - #### macOS prerequisites * Xcode Command Line Tools >= 11 for macOS @@ -271,11 +269,6 @@ $ ./configure $ make -j4 ``` -If you run into a `No module named 'distutils.spawn'` error when executing -`./configure`, please try `python3 -m pip install --upgrade setuptools` or -`sudo apt install python3-distutils -y`. -For more information, see <https://github.com/nodejs/node/issues/30189>. - The `-j4` option will cause `make` to run 4 simultaneous compilation jobs which may reduce build time. For more information, see the [GNU Make Documentation](https://www.gnu.org/software/make/manual/html_node/Parallel.html). |