[issue8663] Failed compile in a non-ASCII path

STINNER Victor report at bugs.python.org
Fri May 14 23:22:46 CEST 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Conditions to reproduce the bug:
 - non ASCII directory
 - don't use make -j N (no MAKEFLAGS environment variable)
 - write make output into a pipe, eg. make 2>&1|cat

My 2 last patches are not enough: there are other functions writing non-ASCII strings to log whereas log encoding is ASCII. The right fix is to use the backslashreplace error handler for the log. Two solutions:
 a) replace sys.stdout by a new file using backslashreplace: I tried this solution for regrtest.py: #8533. My patch for regrtest.py doesn't work on Windows because of a newline issue
 b) emulate backslashreplace only in distutils log

I prefer (a) because it can be implemented in setup.py without touching distutils (tarek told me that distutils shouldn't be patched too much).

distutils_log_backslashreplace.patch implements (b).

----------
Added file: http://bugs.python.org/file17346/distutils_log_backslashreplace.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8663>
_______________________________________


More information about the Python-bugs-list mailing list