From: Jeremy Hylton Date: Tue, 4 Jun 2002 21:05:05 +0000 (+0000) Subject: Define DEBUG as early as possible to avoid import problems. X-Git-Tag: v2.3c1~5465 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=115fdc614fcac8dbdf5547dbcb00e6399d766648;p=python Define DEBUG as early as possible to avoid import problems. --- diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index fbf5d51182..8a348ce3e5 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -12,6 +12,11 @@ __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.errors import * from distutils.util import grok_environment_error @@ -32,11 +37,6 @@ usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: %(script)s cmd --help """ - -# If DISTUTILS_DEBUG is anything other than the empty string, we run in -# debug mode. -DEBUG = os.environ.get('DISTUTILS_DEBUG') - def gen_usage (script_name): script = os.path.basename(script_name) return USAGE % vars()