未验证 提交 634a12b3 编写于 作者: Z Zhou Wei 提交者: GitHub

fix bug of windows chineses msvc (#31493)

上级 43d6abf0
...@@ -982,7 +982,10 @@ def check_abi_compatibility(compiler, verbose=False): ...@@ -982,7 +982,10 @@ def check_abi_compatibility(compiler, verbose=False):
compiler_info = subprocess.check_output( compiler_info = subprocess.check_output(
compiler, stderr=subprocess.STDOUT) compiler, stderr=subprocess.STDOUT)
if six.PY3: if six.PY3:
compiler_info = compiler_info.decode() try:
compiler_info = compiler_info.decode('UTF-8')
except UnicodeDecodeError:
compiler_info = compiler_info.decode('gbk')
match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.strip()) match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.strip())
if match is not None: if match is not None:
version = match.groups() version = match.groups()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册