[pkg] Use io.open with utf-8 encoding to read long description from README
This forces decoding so that this is consistent between Python 2 and 3 as, in
Python 3, decoding which would occur anyways and may fail depending on the
environment locale settings.
--- a/setup.py Tue Jun 07 10:05:30 2016 +0200
+++ b/setup.py Fri Jun 10 13:23:54 2016 +0200
@@ -21,6 +21,7 @@
"""Generic Setup script, takes package info from __pkginfo__.py file
"""
+import io
import os
import sys
import shutil
@@ -53,7 +54,8 @@
author = __pkginfo__['author']
author_email = __pkginfo__['author_email']
-long_description = open('README').read()
+with io.open('README', encoding='utf-8') as f:
+ long_description = f.read()
# import optional features
if USE_SETUPTOOLS: