From owner-svn-ports-all@freebsd.org Thu Dec 31 12:03:03 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8ED5A4BF7F6; Thu, 31 Dec 2020 12:03:03 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D66HC3f6kz4gkX; Thu, 31 Dec 2020 12:03:03 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FF9A7F68; Thu, 31 Dec 2020 12:03:03 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BVC33V7076006; Thu, 31 Dec 2020 12:03:03 GMT (envelope-from kai@FreeBSD.org) Received: (from kai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BVC33IG076005; Thu, 31 Dec 2020 12:03:03 GMT (envelope-from kai@FreeBSD.org) Message-Id: <202012311203.0BVC33IG076005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kai set sender to kai@FreeBSD.org using -f From: Kai Knoblich Date: Thu, 31 Dec 2020 12:03:03 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r559722 - head/devel/py-colorama/files X-SVN-Group: ports-head X-SVN-Commit-Author: kai X-SVN-Commit-Paths: head/devel/py-colorama/files X-SVN-Commit-Revision: 559722 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 12:03:03 -0000 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 [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):