fix README.rst -> long_description encoding

This commit is contained in:
Thomas Grainger 2017-05-02 17:37:17 +01:00
parent 4720513672
commit 834468e8e7
No known key found for this signature in database
GPG Key ID: 995EA0A029283160

View File

@ -10,7 +10,7 @@ from distutils.util import strtobool
from setuptools import setup
def open_local(paths, mode='r', encoding='latin1'):
def open_local(paths, mode='r', encoding='utf8'):
path = os.path.join(
os.path.abspath(os.path.dirname(__file__)),
*paths
@ -19,7 +19,7 @@ def open_local(paths, mode='r', encoding='latin1'):
return codecs.open(path, mode, encoding)
with open_local(['sanic', '__init__.py']) as fp:
with open_local(['sanic', '__init__.py'], encoding='latin1') as fp:
try:
version = re.findall(r"^__version__ = '([^']+)'\r?$",
fp.read(), re.M)[0]