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>
parent
63155c95
Please register or sign in to comment