The Update breaks the build with python36: ===> Returning to build of py36-colorama-0.4.4 =========================================================================== =======================<phase: lib-depends >============================ =========================================================================== =======================<phase: configure >============================ ===> Configuring for py36-colorama-0.4.4 Traceback (most recent call last): File "<string>", line 1, in <module> File "setup.py", line 36, in <module> long_description=read_file('README.rst'), File "setup.py", line 19, in read_file return fp.read() File "/usr/local/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 0xc2 in position 852: ordinal not in range(128) *** Error code 1 Stop. make: stopped in /usr/ports/devel/py-colorama =>> Cleaning up wrkdir ===> Cleaning for py36-colorama-0.4.4 build of devel/py-colorama@py36 | py36-colorama-0.4.4 ended at Mon Nov 23 01:04:02 CET 2020 build time: 00:00:03 !!! build failure encountered !!! This is due to an upstream (encoding) bug in the setup.py. A PR is open: https://github.com/tartley/colorama/issues/291 and the issue will be fixed by the next version.
Reported by Dany on PR #251240.
Created attachment 221117 [details] py-colorama-fix-with-python36.patch (In reply to Guangyuan Yang from comment #0) Those errors appears on some Python ports when they're built with Python 3.6 and the locale isn't UTF-8. Attached is a patch that remedies the build issues with Python 3.6. QA: ~~~ - poudriere -> OK (13.0-CURRENT@r368820 for py36, py37, py38 and py39)
(In reply to Kai Knoblich from comment #2) I would personally prefer to patch setup.py than patching Makefile, since this is an issue that should be handled by the application, not us. Please see: https://github.com/tartley/colorama/pull/294/files that haven't been merged yet.
Comment on attachment 221117 [details] py-colorama-fix-with-python36.patch @Kai This change is: Approved by: portmgr (blanket: build/run bugfix, just-fix-it) And doesn't require maintainer approval Having said that, I'd recomment backporting the upstream change, which is the correct and permanent resolution, not dependent on the end user environment
(In reply to Kubilay Kocak from comment #4) What I am simply suggesting here is that, patching the setup.py might be a better fix here, and it is as simple as the proposed patch. But hey, I am not yet a ports committer, so if patching the Makefile is a batch fix for multiple ports, please by all means go ahead. :)
(In reply to Guangyuan Yang from comment #5) The end of comment 4 suggested the same. The blanket approval applies to any change that fixes a build/run bug, whether Makefile or setup.py
A commit references this bug: Author: kai Date: Thu Dec 31 12:03:03 UTC 2020 New revision: 559722 URL: https://svnweb.freebsd.org/changeset/ports/559722 Log: devel/py-colorama: Fix build with Python 3.6 * Backport PR #294 [1] from upstream repository to enable default UTF-8 encoding in setup.py which fixes the build issue with Python 3.6. PR: 252294, 251240 [2] Submitted by: John W. O'Brien [1] Reported by: Dani <i.dani@outlook.com> [2] Reviewed by: koobs, ygy Approved by: portmgr (blanket: build fix) Changes: head/devel/py-colorama/files/ head/devel/py-colorama/files/patch-setup.py
Committed, thank you koobs@ and ygy@ for your feedback. I backported PR #294 as workaround for the build issue with Python 3.6 as suggested in comment #3 and comment #4. The patch can then probably be deleted with the next release of devel/py-colorama. @ygy: I'll leave this bug open for you for in case if you want to wait until upstream has merged PR #294.
(In reply to Kai Knoblich from comment #8) Kai, thanks for committing the fix. I think I will close this now since the described issue has already been fixed. I will make sure to remove the patch on the next update if the upstream has merged that PR. Happy new year!