[New-bugs-announce] [issue20397] distutils --record option does not validate existance of byte-compiled files

Marcus von Appen report at bugs.python.org
Sun Jan 26 15:20:14 CET 2014

New submission from Marcus von Appen:

Using the --record argument with distutils' install command currently assumes that all .py files can be compiled (and optimized) successfully. 

If this is not the case for whatever reason, you end up with invalid entries in the record list. install_lib._bytecode_filenames() should verify, if the file could be created successfully (by e.g. checking for its existence) or the util.byte_compile() function should return a value that indicates, if the byte-compiled (or optimized) file could be created, so that the subsequent call to _bytecode_filenames() receives a list with valid entries.

The issue can be recreated with e.g. http://pypi.python.org/pypi/Products.PasswordResetTool, which will create invalid entries for skins/PasswordReset/pwreset_constructURL.py,
which acts as template/fragment.

components: Distutils
messages: 209320
nosy: marcusva
priority: normal
severity: normal
status: open
title: distutils --record option does not validate existance of byte-compiled files
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list