提交 39817bd3 编写于 作者: Ł Łukasz Langa

Open pyproject.toml with UTF-8 encoding in all environments

上级 2af32856
from __future__ import absolute_import
import io
import logging
import os
import re
......@@ -444,7 +445,7 @@ class InstallRequirement(object):
requirements, pip will default to installing setuptools and wheel.
"""
if os.path.isfile(self.pyproject_toml):
with open(self.pyproject_toml) as f:
with io.open(self.pyproject_toml, encoding="utf-8") as f:
pp_toml = pytoml.load(f)
build_sys = pp_toml.get('build-system', {})
return (build_sys.get('requires', ['setuptools', 'wheel']), True)
......
[build-system]
requires = ["setuptools", "wheel"]
# Note: pyproject.toml is always UTF-8 🤡
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册