On 19 May 2017 at 16:16, Thomas Kluyver <tho...@kluyver.me.uk> wrote: > On Fri, May 19, 2017, at 03:41 PM, Paul Moore wrote: >> Can we specify what encoding the informational text must be written >> in? > > Sure, that makes sense. What about: > > All hooks are run with working directory set to the root of the source > tree, and MAY print arbitrary informational text on stdout and stderr. > This text SHOULD be UTF-8 encoded, but as building may invoke other > processes, install tools MUST NOT fail if the data they receive is not > valid UTF-8; though in this case the display of the output may be > corrupted.
Looks good, although whether UTF-8 is viable on Windows is something I'll have to think about. > Do we also want to recommend that install tools set > PYTHONIOENCODING=utf-8 when invoking build tools? Or leave this up to > the build tools? Good question. At the moment, the only 2 cases I know of are setuptools/distutils and flit. For setuptools, I'm pretty sure there's no handling of subprocesses, it just fires them off and lets them write to the console - so there's nothing to even ensure a consistent encoding. We may have to allow for special casing with setuptools, as I doubt anyone's going to put in the effort to add a transcoding layer in there. For flit, would having the install tool set PYTHONIOENCODING help? I don't know immediately what I'd do if I were designing a brand new build tool that called out to a 3rd party compiler. Let me think about it. Paul _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig