From a07338e3031b4f11af1cdb1113ed3995db32c87a Mon Sep 17 00:00:00 2001 From: Jiachen Yang Date: Mon, 19 Dec 2016 18:50:13 +0900 Subject: [PATCH] Set setup.py open file encoding to UTF-8 Package building environments usually differ with a working environment where locale settings are tricky. This change enforce using UTF-8 to open files in setup.py in order to avoid possible encoding errors when reading README and changelog files when they contain non-ASCII chars. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e69080f5..cd77727c 100755 --- a/setup.py +++ b/setup.py @@ -17,8 +17,8 @@ entry_points = { ] } -README = open('README.rst').read() -CHANGELOG = open('docs/changelog.rst').read() +README = open('README.rst', 'r', encoding='utf-8').read() +CHANGELOG = open('docs/changelog.rst', 'r', encoding='utf-8').read() setup( name='pelican',