From 73f51ae484f980d785eb59483087ae24adebd376 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 26 Jul 2020 21:01:25 +1000 Subject: [PATCH] Removed distutils from MinGW detection --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f8b9f4a81..d654e4d41 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,6 @@ import struct import subprocess import sys import warnings -from distutils import ccompiler from distutils.command.build_ext import build_ext from setuptools import Extension, setup @@ -131,7 +130,7 @@ class RequiredDependencyException(Exception): pass -PLATFORM_MINGW = "mingw" in ccompiler.get_default_compiler() +PLATFORM_MINGW = os.name == "nt" and "GCC" in sys.version PLATFORM_PYPY = hasattr(sys, "pypy_version_info") if sys.platform == "win32" and PLATFORM_MINGW: