Control: retitle -1 python-biomaj3 encoding issue during build Control: tags -1 patch fixed-upstream
On Thu, Jun 29, 2017 at 09:35:46PM -0400, Scott Kitterman wrote: > Package: src:python-biomaj3 > Version: 3.0.20-1 > Severity: serious > Justification: fails to build from source (but built successfully in the past) > > Now FTBFS. See attached log. > > : pybuild base:184: python3.6 setup.py clean > Traceback (most recent call last): > File "setup.py", line 18, in <module> > README = f.read() > File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode > return codecs.ascii_decode(input, self.errors)[0] > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1781: > ordinal not in range(128) > E: pybuild pybuild:283: clean: plugin distutils failed with: exit code=1: > python3.6 setup.py clean > dh_auto_clean: pybuild --clean --test-nose -i python{version} -p 3.6 3.5 > returned exit code 13 > debian/rules:28: recipe for target 'clean' failed That's actually unrelated to python3.6 - it already failed earlier with python3.5 in reproducible builds and still builds for me with python3.6 in current unstable. Upstream fix, also attached: https://github.com/genouest/biomaj/commit/ad924e3306b6396aaca8741f6f016cc81c68d081 > Scott K cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed
>From ad924e3306b6396aaca8741f6f016cc81c68d081 Mon Sep 17 00:00:00 2001 From: Olivier Sallou <olivier.sal...@irisa.fr> Date: Mon, 10 Oct 2016 17:57:01 +0200 Subject: fix python3 encoding --- setup.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 5bc398e..c6278cd 100644 --- 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 = { -- 2.11.0