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:
parent
16e00a15de
commit
d206aa36e2
@ -14,7 +14,12 @@ import shutil
|
|||||||
import bz2
|
import bz2
|
||||||
import io
|
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
|
from distutils.version import StrictVersion
|
||||||
|
|
||||||
# If not run from node/, cd to node/.
|
# If not run from node/, cd to node/.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user