Merge pull request #682 from graingert/fix-readme.rst-encoding

fix README.rst -> long_description encoding
This commit is contained in:
Eli Uriegas 2017-05-02 10:48:45 -07:00 committed by GitHub
commit 7f9ecd659c

View File

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