Issue #27048: Prevents distutils failing on Windows when environment variables contain non-ASCII characters

This commit is contained in:
Steve Dower 2016-06-17 09:32:38 -07:00
parent 85e6635edf
commit 08bb8a41cc
3 changed files with 23 additions and 4 deletions

View file

@ -86,11 +86,9 @@ def _get_vc_env(plat_spec):
try:
out = subprocess.check_output(
'"{}" {} && set'.format(vcvarsall, plat_spec),
shell=True,
'cmd /u /c "{}" {} && set'.format(vcvarsall, plat_spec),
stderr=subprocess.STDOUT,
universal_newlines=True,
)
).decode('utf-16le', errors='replace')
except subprocess.CalledProcessError as exc:
log.error(exc.output)
raise DistutilsPlatformError("Error executing {}"