From afe8dc48bb3928860829370541df67c5501b5057 Mon Sep 17 00:00:00 2001 From: PhiBo Date: Fri, 5 Aug 2016 06:41:51 +0200 Subject: [PATCH] build - Use utf-8 to read the readme file --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 575363b..565cc3a 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python import os +import sys from setuptools import setup, find_packages base_dir = os.path.dirname(__file__) @@ -8,8 +9,13 @@ with open(os.path.join(base_dir, "overpy", "__about__.py")) as f: exec(f.read(), about) -with open(os.path.join(base_dir, "README.rst")) as f: - long_description = f.read() +filename_readme = os.path.join(base_dir, "README.rst") +if sys.version_info[0] == 2: + import io + fp = io.open(filename_readme, encoding="utf-8") +else: + fp = open(filename_readme, encoding="utf-8") +long_description = fp.read() setup( name=about["__title__"],