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 eric.araujo
Recipients alexis, eric.araujo, pitrou, tarek, vstinner
Date 2011-11-03.16:31:34
SpamBayes Score 1.5150653e-10
Marked as misclassified No
Message-id <1320337895.48.0.570688676695.issue12119@psf.upfronthosting.co.za>
In-reply-to
Content
I have changed packaging in dad02a080bbc to work even under -O or -B.

packaging gives control over the creation of pyc and/or pyo files to the user with its own explicit options (--compile/--no-compile and --optimize 0/1/2), and the behavior should not change if the calling Python happens to run with -B or -O for whatever reason.

Other libraries make different choices: For example, compileall gives no option to generate pyo instead of pyc, you have to call it with python -O.  I argue that distutils and packaging are different.  Calling “python -B setup.py build” means that you don’t want pyc files to be created for the modules that are imported for this invocation, but it should not mean that distutils needs to behave as if --no-compile was given.

Fixing this is a small change, and in my opinion a bug fix.  Of course, I would not remove the DistutilsByteCompileError to preserve compatibility, but I would remove the warnings/exceptions when running under -B.  Can I do it?
History
Date User Action Args
2011-11-03 16:31:35eric.araujosetrecipients: + eric.araujo, pitrou, vstinner, tarek, alexis
2011-11-03 16:31:35eric.araujosetmessageid: <1320337895.48.0.570688676695.issue12119@psf.upfronthosting.co.za>
2011-11-03 16:31:34eric.araujolinkissue12119 messages
2011-11-03 16:31:34eric.araujocreate