]> granicus.if.org Git - python/commitdiff
Use distutils.debug.DEBUG instead of distutils.core.DEBUG.
authorJeremy Hylton <jeremy@alum.mit.edu>
Wed, 11 Sep 2002 16:31:53 +0000 (16:31 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Wed, 11 Sep 2002 16:31:53 +0000 (16:31 +0000)
Note that distutils.core.DEBUG still works if client code uses it, but
the core code avoids circular references by using distutils.debug.

Lib/distutils/ccompiler.py
Lib/distutils/cmd.py
Lib/distutils/command/bdist_rpm.py
Lib/distutils/command/install.py
Lib/distutils/core.py
Lib/distutils/dist.py
Lib/distutils/filelist.py

index f1a50cbddcf79432c9ae39d0d7dbf8460ff37b18..5a0641ea5ce8770221a2210ac75bf8de102d5b14 100644 (file)
@@ -923,7 +923,7 @@ class CCompiler:
         log.debug(msg)
 
     def debug_print (self, msg):
-        from distutils.core import DEBUG
+        from distutils.debug import DEBUG
         if DEBUG:
             print msg
 
index 25ff3025b6665c2081a56c7e0aed11d858d18171..6a268184c050096679c835b0fd9904bebfd8a156 100644 (file)
@@ -198,7 +198,7 @@ class Command:
         """Print 'msg' to stdout if the global DEBUG (taken from the
         DISTUTILS_DEBUG environment variable) flag is true.
         """
-        from distutils.core import DEBUG
+        from distutils.debug import DEBUG
         if DEBUG:
             print msg
             sys.stdout.flush()
index dd9dc6610814a847a5900c4ee8392b796b571d8d..bbaad7dc7b19304a62d821e9bf2f39185fb2829a 100644 (file)
@@ -10,7 +10,8 @@ __revision__ = "$Id$"
 import sys, os, string
 import glob
 from types import *
-from distutils.core import Command, DEBUG
+from distutils.core import Command
+from distutils.debug import DEBUG
 from distutils.util import get_platform
 from distutils.file_util import write_file
 from distutils.errors import *
index 322177f44131bae2d56c196e4a3b667a5bd4b843..67f37893f58f2e1bde1d23e0b89ce3fcb683db78 100644 (file)
@@ -10,7 +10,8 @@ __revision__ = "$Id$"
 
 import sys, os, string
 from types import *
-from distutils.core import Command, DEBUG
+from distutils.core import Command
+from distutils.debug import DEBUG
 from distutils.sysconfig import get_config_vars
 from distutils.errors import DistutilsPlatformError
 from distutils.file_util import write_file
index 8a348ce3e55cefc1b2066c4d53aaee89ddf117cc..9a6bff6b55af514ce8873fd5fd537a7e34bd3969 100644 (file)
@@ -13,10 +13,7 @@ __revision__ = "$Id$"
 import sys, os
 from types import *
 
-# If DISTUTILS_DEBUG is anything other than the empty string, we run in
-# debug mode.
-DEBUG = os.environ.get('DISTUTILS_DEBUG')
-
+from distutils.debug import DEBUG
 from distutils.errors import *
 from distutils.util import grok_environment_error
 
@@ -25,7 +22,6 @@ from distutils.dist import Distribution
 from distutils.cmd import Command
 from distutils.extension import Extension
 
-
 # This is a barebones help message generated displayed when the user
 # runs the setup script with no arguments at all.  More useful help
 # is generated with various --help options: global help, list commands,
index f995d58e9ae6d8eaef966ca407ec6d6a9d1bf1de..92cb8320da344782b1c7fa71bd21bea6fd786a6d 100644 (file)
@@ -16,7 +16,7 @@ from distutils.errors import *
 from distutils.fancy_getopt import FancyGetopt, translate_longopt
 from distutils.util import check_environ, strtobool, rfc822_escape
 from distutils import log
-from distutils.core import DEBUG
+from distutils.debug import DEBUG
 
 # Regex to define acceptable Distutils command names.  This is not *quite*
 # the same as a Python NAME -- I don't allow leading underscores.  The fact
index e2e2457c8b26535723842557453aab2ed3f143fe..b4f3269cf15f8e03837926ee9cc5263f166636e9 100644 (file)
@@ -54,7 +54,7 @@ class FileList:
         """Print 'msg' to stdout if the global DEBUG (taken from the
         DISTUTILS_DEBUG environment variable) flag is true.
         """
-        from distutils.core import DEBUG
+        from distutils.debug import DEBUG
         if DEBUG:
             print msg