[py2] Use io.open() to get the encoding parameter
authorDenis Laxalde <denis.laxalde@logilab.fr>
Fri, 04 Oct 2019 10:54:15 +0200
changeset 3055 c1bdaadb783c
parent 3054 c3306bbf1b0a
child 3056 ca793a3a1ac5
[py2] Use io.open() to get the encoding parameter
setup.py
--- a/setup.py	Fri Oct 04 10:43:12 2019 +0200
+++ b/setup.py	Fri Oct 04 10:54:15 2019 +0200
@@ -20,6 +20,7 @@
 # along with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """Generic Setup script, takes package info from __pkginfo__.py file
 """
+import io
 from os.path import join, dirname
 
 from setuptools import find_packages, setup
@@ -44,7 +45,7 @@
 author_email = __pkginfo__['author_email']
 classifiers = __pkginfo__['classifiers']
 
-with open(join(here, 'README'), encoding='utf-8') as f:
+with io.open(join(here, 'README'), encoding='utf-8') as f:
     long_description = f.read()
 
 # get optional metadatas