Message146943
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? |
|
Date |
User |
Action |
Args |
2011-11-03 16:31:35 | eric.araujo | set | recipients:
+ eric.araujo, pitrou, vstinner, tarek, alexis |
2011-11-03 16:31:35 | eric.araujo | set | messageid: <1320337895.48.0.570688676695.issue12119@psf.upfronthosting.co.za> |
2011-11-03 16:31:34 | eric.araujo | link | issue12119 messages |
2011-11-03 16:31:34 | eric.araujo | create | |
|