setup.py
changeset 51830 454feddab720
parent 51751 9b8c71d0b785
parent 51829 6388fd855f66
child 51832 905bc9d0a149
--- a/setup.py	Wed Aug 28 23:25:26 2024 +0200
+++ b/setup.py	Fri Sep 06 02:12:19 2024 +0200
@@ -1660,7 +1660,11 @@
     # Allow compiler/linker flags to be added to Visual Studio builds.  Passing
     # extra_link_args to distutils.extensions.Extension() doesn't have any
     # effect.
-    from distutils import msvccompiler
+    try:
+        # setuptools < 65.0
+        from distutils import msvccompiler
+    except ImportError:
+        from distutils import _msvccompiler as msvccompiler
 
     msvccompilerclass = msvccompiler.MSVCCompiler