1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Mon, 8 Jan 2018 21:51:23 +0100
Subject: Fix reading UTF-8 files in setup.py for Python3.
---
setup.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index efa0194..b285f2b 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,6 @@
from __future__ import absolute_import
+import io
import sys
import shutil
import os
@@ -294,7 +295,7 @@ if cythonize is not None:
def read_file(filename):
- with open(os.path.join(basedir, filename)) as f:
+ with io.open(os.path.join(basedir, filename), encoding='utf-8') as f:
return f.read()
|