Created attachment 179022 [details] textproc/py-tabletext: Specify encoding of files in setup.py Sample error: ===> Configuring for py34-tabletext-0.1 Traceback (most recent call last): File "<string>", line 1, in <module> File "setup.py", line 10, in <module> + open("CHANGELOG.rst").read(), File "/usr/local/lib/python3.4/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 1321: ordinal not in range(128) *** Error code 1 I reported this upstream https://github.com/Thibauth/tabletext/issues/1 A fix is attached.
The attached patch appears to break the build under python2. ===> Configuring for py27-tabletext-0.1 Traceback (most recent call last): File "<string>", line 1, in <module> File "setup.py", line 10, in <module> + open("CHANGELOG.rst", encoding='utf8').read(), TypeError: 'encoding' is an invalid keyword argument for this function *** Error code 1
Created attachment 179398 [details] textproc/py-tabletext: Specify encoding of files in setup.py This version of the patch only passes `encoding` to `open` when built with py3k or later. poudriere testport: OK (py2.7, py3.4, py3.5, py3.6)
It doesn't look like FreeBSD-specific problem. Did you submit your patch to the author?
(In reply to Dmitry Sivachenko from comment #3) I opened a bug [0] but haven't yet submitted the patch. [0] https://github.com/Thibauth/tabletext/issues/1
(In reply to Dmitry Sivachenko from comment #3) Submitted pull request [0] [0] https://github.com/Thibauth/tabletext/pull/2
A commit references this bug: Author: demon Date: Tue Feb 14 17:07:11 UTC 2017 New revision: 434129 URL: https://svnweb.freebsd.org/changeset/ports/434129 Log: Fix build with python3.x PR: 216208 Submitted by: John W. O'Brien <john@saltant.com> maintainer timeout. Changes: head/textproc/py-tabletext/files/ head/textproc/py-tabletext/files/patch-setup.py