[Python-modules-commits] [obsub] 01/02: Add setup-read-bytes patch to read README.rst as bytes and then convert using UTF-8 encoding (Closes: #844934).
Free Ekanayaka
freee at moszumanska.debian.org
Wed Nov 23 04:51:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
freee pushed a commit to branch master
in repository obsub.
commit 3b6db61aec67585b15f21d4d3ab29832319e2a34
Author: Free Ekanayaka <freee at debian.org>
Date: Wed Nov 23 04:41:24 2016 +0000
Add setup-read-bytes patch to read README.rst as bytes
and then convert using UTF-8 encoding (Closes: #844934).
---
debian/patches/0001-setup-read-bytes.patch | 23 +++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 24 insertions(+)
diff --git a/debian/patches/0001-setup-read-bytes.patch b/debian/patches/0001-setup-read-bytes.patch
new file mode 100644
index 0000000..cc1babf
--- /dev/null
+++ b/debian/patches/0001-setup-read-bytes.patch
@@ -0,0 +1,23 @@
+From: Free Ekanayaka <freee at debian.org>
+Date: Wed, 23 Nov 2016 04:39:11 +0000
+Subject: setup-read-bytes
+
+Fix setup.py reading README.rst as unicode and failing with Python 3
+if the LC_ALL is set to POSIX.
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index b11b95f..d4decc6 100755
+--- a/setup.py
++++ b/setup.py
+@@ -7,7 +7,7 @@ from setuptools import setup
+ # Create a front page for PyPI:
+ long_description = None
+ try:
+- long_description = open('README.rst').read()
++ long_description = open('README.rst', "rb").read().decode("utf-8")
+ long_description += '\n' + open('CHANGELOG.rst').read()
+ except IOError:
+ # some file is not available
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9d4f63d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-setup-read-bytes.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/obsub.git
More information about the Python-modules-commits
mailing list