diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-09-11 16:31:53 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-09-11 16:31:53 (GMT) |
commit | fcd7353863c024bb87aabe7c4639ca8df692ac85 (patch) | |
tree | 8e25bd5d72391ff8ab8be6f6e381a1f356c8b901 | |
parent | 5f6228ed461987709c75dd3ebd253beb412ed457 (diff) | |
download | cpython-fcd7353863c024bb87aabe7c4639ca8df692ac85.zip cpython-fcd7353863c024bb87aabe7c4639ca8df692ac85.tar.gz cpython-fcd7353863c024bb87aabe7c4639ca8df692ac85.tar.bz2 |
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.
-rw-r--r-- | Lib/distutils/ccompiler.py | 2 | ||||
-rw-r--r-- | Lib/distutils/cmd.py | 2 | ||||
-rw-r--r-- | Lib/distutils/command/bdist_rpm.py | 3 | ||||
-rw-r--r-- | Lib/distutils/command/install.py | 3 | ||||
-rw-r--r-- | Lib/distutils/core.py | 6 | ||||
-rw-r--r-- | Lib/distutils/dist.py | 2 | ||||
-rw-r--r-- | Lib/distutils/filelist.py | 2 |
7 files changed, 9 insertions, 11 deletions
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 @@ class CCompiler: log.debug(msg) def debug_print (self, msg): - from distutils.core import DEBUG + from distutils.debug import DEBUG if DEBUG: print msg diff --git a/Lib/distutils/cmd.py b/Lib/distutils/cmd.py index 25ff302..6a26818 100644 --- a/Lib/distutils/cmd.py +++ b/Lib/distutils/cmd.py @@ -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() diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py index dd9dc66..bbaad7d 100644 --- a/Lib/distutils/command/bdist_rpm.py +++ b/Lib/distutils/command/bdist_rpm.py @@ -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 * diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index 322177f..67f3789 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -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 diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index 8a348ce..9a6bff6 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -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, diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py index f995d58..92cb832 100644 --- a/Lib/distutils/dist.py +++ b/Lib/distutils/dist.py @@ -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 diff --git a/Lib/distutils/filelist.py b/Lib/distutils/filelist.py index e2e2457..b4f3269 100644 --- a/Lib/distutils/filelist.py +++ b/Lib/distutils/filelist.py @@ -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 |