From 977822d31d48057de2111f27ee860735d4eeae98 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Fri, 16 Aug 2019 15:20:52 +0800 Subject: [PATCH] fix(setup): fix encoding problem in setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6f9bdcde..0e673d8a 100644 --- a/setup.py +++ b/setup.py @@ -6,14 +6,14 @@ try: pkg_name = 'gnes' libinfo_py = path.join(pkg_name, '__init__.py') - libinfo_content = open(libinfo_py, 'r').readlines() + libinfo_content = open(libinfo_py, 'r', encoding='utf8').readlines() version_line = [l.strip() for l in libinfo_content if l.startswith('__version__')][0] exec(version_line) # produce __version__ except FileNotFoundError: __version__ = '0.0.0' try: - with open('README.md') as fp: + with open('README.md', encoding='utf8') as fp: _long_description = fp.read() except FileNotFoundError: _long_description = ''