diff options
author | Richard Lau <rlau@redhat.com> | 2021-05-11 13:03:37 +0300 |
---|---|---|
committer | Richard Lau <rlau@redhat.com> | 2021-05-12 12:42:25 +0300 |
commit | d206aa36e27e212d00857ab56d174ace5e6b6c45 (patch) | |
tree | 78f3c66c7bda353deb6c514bbc77382394e742b9 /configure.py | |
parent | 16e00a15deafdad01c336bcae79f568f6bcb4c1b (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-x | configure.py | 7 |
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/. |