From e06bdba576156156eb63a60a48e7c71065e84371 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Tue, 11 May 2021 06:03:37 -0400 Subject: [PATCH] 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. --- configure.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.py b/configure.py index b877319841e1e2..9ec7da8924b132 100755 --- a/configure.py +++ b/configure.py @@ -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/.