Skip to content

Commit

Permalink
Avoid build time spam on Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepurvis committed Apr 10, 2024
1 parent ff31d45 commit 4c20f8c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cmake/interrogate_setup_dot_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@

setup_modules = []

try:
import distutils.core
setup_modules.append(distutils.core)
except ImportError:
pass
# Importing distutils on Python 3.11 emits warnings into the console
# and on 3.12 it will be removed altogether.
if sys.version_info[:2] < (3, 11):
try:
import distutils.core
setup_modules.append(distutils.core)
except ImportError:
pass

try:
import setuptools
Expand Down

0 comments on commit 4c20f8c

Please sign in to comment.