summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-07-05 09:42:47 (GMT)
committerGitHub <noreply@github.com>2023-07-05 09:42:47 (GMT)
commit637102980d12e5ff99b69ddffd5f05ecfe0adeb6 (patch)
tree6f6e89e72840ad97fa401bf6f4863c2e2b6a46c6 /Lib/test/support
parent00c522a81c726f3a15b16ae67bba4840431afdaf (diff)
downloadcpython-637102980d12e5ff99b69ddffd5f05ecfe0adeb6.zip
cpython-637102980d12e5ff99b69ddffd5f05ecfe0adeb6.tar.gz
cpython-637102980d12e5ff99b69ddffd5f05ecfe0adeb6.tar.bz2
[3.12] gh-100238: Use setuptools in peg-generator and reenable tests (GH-104798) (#105135)
(cherry picked from commit afa759fb800be416f69e3e9c9b3efe68006316f5) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index c59508b..3f1cc3a 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -1868,15 +1868,16 @@ def missing_compiler_executable(cmd_names=[]):
missing.
"""
- # TODO (PEP 632): alternate check without using distutils
- from distutils import ccompiler, sysconfig, spawn, errors
+ from setuptools._distutils import ccompiler, sysconfig, spawn
+ from setuptools import errors
+
compiler = ccompiler.new_compiler()
sysconfig.customize_compiler(compiler)
if compiler.compiler_type == "msvc":
# MSVC has no executables, so check whether initialization succeeds
try:
compiler.initialize()
- except errors.DistutilsPlatformError:
+ except errors.PlatformError:
return "msvc"
for name in compiler.executables:
if cmd_names and name not in cmd_names: