Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions mypyc/build.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,6 +45,13 @@
if TYPE_CHECKING:
from distutils.core import Extension # noqa

try:
# Import setuptools so that it monkey-patch overrides distutils
import setuptools # type: ignore # noqa
except ImportError:
if sys.version_info >= (3, 12):
# Raise on Python 3.12, since distutils will go away forever
raise
from distutils import sysconfig, ccompiler


Expand Down