* lib: print Python executable path using UTF-8
The Python executable path may have non-ASCII characters, which can make
the print function fail if the environment encoding is different. This fixes
this issue by using stdout.buffer, which can be used with UTF-8 encoding
for the output, regardless of the environment encoding.
Fixes: https://github.com/nodejs/node-gyp/issues/2829
* fixup! lib: print Python executable path using UTF-8
BREAKING CHANGE: the `Gyp` class exported is now created using
ECMAScript classes and therefore might have small differences to classes
that were previously created with `util.inherits`.
BREAKING CHANGE: All internal functions have been coverted to return
promises and no longer accept callbacks. This is not a breaking change
for users but may be breaking to consumers of `node-gyp` if you are
requiring internal functions directly.
These changes favor py launcher over other checks excluding command line
or npm configuration and environment variable checks.
Also, updated supported python versions list.
Fixes: https://github.com/nodejs/node-gyp/issues/2871
This allows us to start testing Python 3 without breaking node-gyp
for users.
This also adds support for NODE_GYP_FORCE_PYTHON, which will be the
only Python binary acceptable when defined.
PR-URL: https://github.com/nodejs/node-gyp/pull/1815
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>