New submission from Ned Deily <n...@acm.org>:

On Python 3.1.2rc1 and py3k, "make install" results in two identical spurious 
error messages:

Compiling /path/to/lib/python3.1/lib2to3/tests/data/bom.py ...
***   File "/usr/local/lib/python3.1/lib2to3/tests/data/bom.py", line 1
    # coding: utf-8
      ^
SyntaxError: invalid character in identifier

The messages are triggered by the libinstall Makefile which calls compileall 
twice to generate .pyc and .pyo files for all modules in the installed library. 
 compileall uses py_compile which, due to the problem documented in Issue8168, 
stumbles over the lib2to3 data file bom.py.  While fixing that issue would make 
this problem go away, it seems like it would be better to avoid compiling the 
lib2to3 test files altogether.  Modifying the '-x" regexp on the two relevant 
calls to compileall in Makefile.pre.in accomplishes this:

-x 
'bad_coding|badsyntax|site-packages|py2_test_grammar|crlf|different_encoding|lib2to3/tests'
 \

A similar change should be considered for trunk and 2.6 as well.

----------
components: Installation
messages: 101258
nosy: benjamin.peterson, ned.deily
severity: normal
status: open
title: SyntaxError messages during install due to compilation of lib2to3 test 
files
versions: Python 3.1, Python 3.2

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

Reply via email to