[Python-modules-commits] [python-lupa] 09/11: Add patch to fix reading UTF-8 files in setup.py for Python3.

Michael Fladischer fladi at moszumanska.debian.org
Mon Jan 8 21:03:08 UTC 2018


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch debian/master
in repository python-lupa.

commit c4308d14f47817c53d95f325bbe134a513758968
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Mon Jan 8 21:59:22 2018 +0100

    Add patch to fix reading UTF-8 files in setup.py for Python3.
---
 debian/changelog                                   |  1 +
 ...ading-UTF-8-files-in-setup.py-for-Python3.patch | 28 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 30 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 253280a..4eff5fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ python-lupa (1.6+dfsg-1) UNRELEASED; urgency=low
   * Bump Standards-Version to 4.1.3.
   * Run wrap-and-sort -bast to reduce diff size of future changes.
   * Clean up lupa.egg-info/PKG-INFO to allow two builds in a row.
+  * Add patch to fix reading UTF-8 files in setup.py for Python3.
 
  -- Michael Fladischer <fladi at debian.org>  Mon, 08 Jan 2018 21:43:20 +0100
 
diff --git a/debian/patches/0001-Fix-reading-UTF-8-files-in-setup.py-for-Python3.patch b/debian/patches/0001-Fix-reading-UTF-8-files-in-setup.py-for-Python3.patch
new file mode 100644
index 0000000..7af1963
--- /dev/null
+++ b/debian/patches/0001-Fix-reading-UTF-8-files-in-setup.py-for-Python3.patch
@@ -0,0 +1,28 @@
+From: Michael Fladischer <FladischerMichael at 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()
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..76b485a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-reading-UTF-8-files-in-setup.py-for-Python3.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-lupa.git



More information about the Python-modules-commits mailing list