[New-bugs-announce] [issue16989] allow distutils debug mode to be enabled more easily

Chris Jerdonek report at bugs.python.org
Fri Jan 18 00:41:55 CET 2013


New submission from Chris Jerdonek:

This issue is to allow distutils's debug mode [1] to be enabled more easily (e.g. programmatically).

Currently, for example, distutils.core does the following:

    from distutils.debug import DEBUG

(from http://hg.python.org/cpython/file/cb297930d2cf/Lib/distutils/core.py#l12)

which means that it's not sufficient to set the DEBUG attribute on the distutils.debug module.  Instead, to enable debug mode programmatically you have to do something like the following prior to importing from distutils:

    import os
    os.environ['DISTUTILS_DEBUG'] = "1"  # "" for False or "1" for True.

This issue can be fixed simply by changing the affected import statements from importing the value to importing just the module (and subsequently accessing the value via the module).


[1] http://docs.python.org/dev/distutils/setupscript.html#debugging-the-setup-script

----------
assignee: eric.araujo
components: Distutils
keywords: easy
messages: 180161
nosy: chris.jerdonek, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: allow distutils debug mode to be enabled more easily
type: enhancement
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16989>
_______________________________________


More information about the New-bugs-announce mailing list