Skip to content

Commit

Permalink
build: add workaround for V8 builds
Browse files Browse the repository at this point in the history
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: #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>
  • Loading branch information
richardlau committed May 12, 2021
1 parent 16e00a1 commit d206aa3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
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/.
Expand Down

0 comments on commit d206aa3

Please sign in to comment.