• Éric Araujo's avatar
    Improve byte-compilation in packaging to be independent of -O or -B. · 88080150
    Éric Araujo yazdı
    The code I fixed to comply with PEP 3147 still had one bug: When run
    under python -O, some paths for pyc files would be pyo, because I called
    imp.cache_from_source without explicit debug_override argument in some
    places, and under -O that would return .pyo (this is well explained in
    the imp docs).  Now all code (util.byte_compile, build_py, install_lib)
    can create .pyo files according to options given by users,
    without interference from the calling Python’s own optimize mode.
    
    On a related topic, I also removed the code that prevented byte
    compilation under python -B.  The rationale is that packaging gives
    control over the creation of pyc files to the user with its own explicit
    option, and the behavior should not be changed if the calling Python
    happens to run with -B for whatever reason.  I will argue that this is a
    bug fix and ask to be allowed to backport this change to distutils.
    
    Finally, I moved one nugget of information about the --compile and
    --optimize options from the source into the doc.  It clears up a
    misunderstanding that I (and maybe other people) had.
    88080150
Adı
Son kayıt (commit)
Son güncelleme
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.bzrignore Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...