Use distutils.debug.DEBUG instead of distutils.core.DEBUG.
Note that distutils.core.DEBUG still works if client code uses it, but
the core code avoids circular references by using distutils.debug.
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
index f1a50cb..5a0641e 100644
--- a/Lib/distutils/ccompiler.py
+++ b/Lib/distutils/ccompiler.py
@@ -923,7 +923,7 @@
log.debug(msg)
def debug_print (self, msg):
- from distutils.core import DEBUG
+ from distutils.debug import DEBUG
if DEBUG:
print msg