From 04788747ccdc97c7fb20fbe9c63ffaf32dbb2b45 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 991da107f62f08..0156afdc4c9163 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/. @@ -1859,7 +1853,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