Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Lau <rlau@redhat.com>2021-05-06 01:48:14 +0300
committerMichaƫl Zasso <targos@protonmail.com>2021-05-17 10:11:34 +0300
commit3bb12db25577ef4c8582736ff4469d88e1af8bba (patch)
treedd092790d544314d1a25c15aa5032366563a7918 /configure.py
parentd3de0ef5d4fbab13358728db7af38760b52467a3 (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 'configure.py')
-rwxr-xr-xconfigure.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index 6798b4a445c..b877319841e 100755
--- a/configure.py
+++ b/configure.py
@@ -14,7 +14,7 @@ import shutil
import bz2
import io
-from distutils.spawn import find_executable as which
+from shutil import which
from distutils.version import StrictVersion
# If not run from node/, cd to node/.