Éric Araujo <mer...@netwok.org> added the comment:

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?

----------
assignee: tarek -> eric.araujo
resolution: duplicate -> 
stage:  -> commit review
status: closed -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12119>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to