Date: Thu, 31 Dec 2020 12:03:03 +0000 (UTC) From: Kai Knoblich <kai@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r559722 - head/devel/py-colorama/files Message-ID: <202012311203.0BVC33IG076005@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kai Date: Thu Dec 31 12:03:02 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) Added: head/devel/py-colorama/files/ head/devel/py-colorama/files/patch-setup.py (contents, props changed) Added: head/devel/py-colorama/files/patch-setup.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-colorama/files/patch-setup.py Thu Dec 31 12:03:02 2020 (r559722) @@ -0,0 +1,26 @@ +Default to UTF-8 encoding to fix build with Python 3.6 + +Obtained from: https://github.com/tartley/colorama/pull/294/files + +--- setup.py.orig 2020-10-12 21:22:32 UTC ++++ setup.py +@@ -3,6 +3,7 @@ + + from __future__ import with_statement + ++from io import open + import os + import re + try: +@@ -14,8 +15,9 @@ except ImportError: + NAME = 'colorama' + + +-def read_file(path): +- with open(os.path.join(os.path.dirname(__file__), path)) as fp: ++def read_file(path, encoding='utf8'): ++ with open(os.path.join(os.path.dirname(__file__), path), ++ encoding=encoding) as fp: + return fp.read() + + def _get_version_match(content):
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012311203.0BVC33IG076005>