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-11 13:03:37 +0300
committerMichaël Zasso <targos@protonmail.com>2021-05-17 10:11:35 +0300
commitb0df28dea58433231ddcec7b87eb46b009fa327e (patch)
tree5fb6712dc224fc13af29facdb600a3fef61ae3e4 /configure.py
parent4c4902748c39f8b2db5b6a75d090edc84645c05b (diff)
build: add workaround for V8 builds
V8's build toolchain is not compatible with Python 3 and the CI job that tests V8 needs to be run with Python 2. Add a fallback to `find_executable` from `distutils.spawn` to allow the configure script to run in the V8 test job. PR-URL: https://github.com/nodejs/node/pull/38632 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index b877319841e..9ec7da8924b 100755
--- a/configure.py
+++ b/configure.py
@@ -14,7 +14,12 @@ import shutil
import bz2
import io
-from shutil import which
+# Fallback to find_executable from distutils.spawn is a stopgap for
+# supporting V8 builds, which do not yet support Python 3.
+try:
+ from shutil import which
+except ImportError:
+ from distutils.spawn import find_executable as which
from distutils.version import StrictVersion
# If not run from node/, cd to node/.