This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek, eric.araujo, tarek
Date 2013-01-17.23:41:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358466115.01.0.322407717365.issue16989@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-01-17 23:41:55chris.jerdoneksetrecipients: + chris.jerdonek, tarek, eric.araujo
2013-01-17 23:41:55chris.jerdoneksetmessageid: <1358466115.01.0.322407717365.issue16989@psf.upfronthosting.co.za>
2013-01-17 23:41:54chris.jerdoneklinkissue16989 messages
2013-01-17 23:41:54chris.jerdonekcreate