File: 0001-Fix-reading-UTF-8-files-in-setup.py-for-Python3.patch

package info (click to toggle)
python-lupa 1.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,856 kB
  • sloc: python: 2,317; ansic: 10; makefile: 7
file content (28 lines) | stat: -rw-r--r-- 655 bytes parent folder | download
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()