From ff48705372878561a30f4a7021423bff8669b59f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 1 Jan 2022 08:27:27 -0800 Subject: [PATCH] build: remove Python 2 workaround MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove workaround for Python 2. I confirmed that V8 build still works by running `./configure.py && make v8`. PR-URL: https://github.com/nodejs/node/pull/41357 Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca Reviewed-By: Jiawen Geng Reviewed-By: Zijian Liu --- configure.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/configure.py b/configure.py index 75b4ba264fb7e8..148a404fef74db 100755 --- a/configure.py +++ b/configure.py @@ -14,12 +14,6 @@ import bz2 import io -# 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/. @@ -1864,7 +1858,7 @@ def make_bin_override(): # sys.executable. This directory will be prefixed to the PATH, so that # other tools that shell out to `python` will use the appropriate python - which_python = which('python') + which_python = shutil.which('python') if (which_python and os.path.realpath(which_python) == os.path.realpath(sys.executable)): return