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>
This commit is contained in:
Richard Lau authored and Michaël Zasso committed 2021-05-17 09:11:35 +02:00
1 parent 4c4902748c
commit b0df28dea5
1 file changed
+6 -1
+6 -1
View File
@@ -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/.