[med-svn] [python-biomaj3] 01/07: Fix python3 encoding
Andreas Tille
tille at debian.org
Tue Aug 29 20:49:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository python-biomaj3.
commit 4d9f2a7062f97e724721fc97e5b70c79a3bba960
Author: Andreas Tille <tille at debian.org>
Date: Tue Aug 29 22:40:45 2017 +0200
Fix python3 encoding
---
debian/changelog | 8 ++++++++
debian/patches/fix_python3_encoding.patch | 29 +++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 38 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index dc87d6e..03fd505 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-biomaj3 (3.0.20-2) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Fix python3 encoding
+ Closes: #866547
+
+ -- Andreas Tille <tille at debian.org> Tue, 29 Aug 2017 22:39:47 +0200
+
python-biomaj3 (3.0.20-1) unstable; urgency=medium
* New package (Closes: # 851366).
diff --git a/debian/patches/fix_python3_encoding.patch b/debian/patches/fix_python3_encoding.patch
new file mode 100644
index 0000000..c8442c9
--- /dev/null
+++ b/debian/patches/fix_python3_encoding.patch
@@ -0,0 +1,29 @@
+Author: Olivier Sallou
+Last-Update: 10 Oct 2016
+Source: https://github.com/genouest/biomaj/commit/ad924e3306b6396aaca8741f6f016cc81c68d081
+Bug-Debian: https://bugs.debian.org/866547
+Description: fix python3 encoding
+
+--- a/setup.py
++++ b/setup.py
+@@ -14,10 +14,16 @@ class post_install(install):
+ SchemaVersion.migrate_pendings()
+
+ here = os.path.abspath(os.path.dirname(__file__))
+-with open(os.path.join(here, 'README.md')) as f:
+- README = f.read()
+-with open(os.path.join(here, 'CHANGES.txt')) as f:
+- CHANGES = f.read()
++try:
++ with open(os.path.join(here, 'README.md')) as f:
++ README = f.read()
++ with open(os.path.join(here, 'CHANGES.txt')) as f:
++ CHANGES = f.read()
++except UnicodeDecodeError:
++ with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
++ README = f.read()
++ with open(os.path.join(here, 'CHANGES.txt'), encoding='utf-8') as f:
++ CHANGES = f.read()
+
+
+ config = {
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..7fdf513 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_python3_encoding.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-biomaj3.git
More information about the debian-med-commit
mailing list