diff options
author | mef <mef@pkgsrc.org> | 2021-01-09 00:43:43 +0000 |
---|---|---|
committer | mef <mef@pkgsrc.org> | 2021-01-09 00:43:43 +0000 |
commit | c8c8cd030e0ccf20c4c2df64cc348fb050670e0c (patch) | |
tree | 9022efe771e59c3af3ff7c360580a9a9be6d128b /comms | |
parent | 32049f01b92a07e32857041608ebcc31449274f4 (diff) | |
download | pkgsrc-c8c8cd030e0ccf20c4c2df64cc348fb050670e0c.tar.gz |
(comms/py-colorama) Add patch for py36, can't decode byte 0xc2
Diffstat (limited to 'comms')
-rw-r--r-- | comms/py-colorama/distinfo | 3 | ||||
-rw-r--r-- | comms/py-colorama/patches/patch-setup.py | 34 |
2 files changed, 36 insertions, 1 deletions
diff --git a/comms/py-colorama/distinfo b/comms/py-colorama/distinfo index 56d3520fafc..5ce533576c9 100644 --- a/comms/py-colorama/distinfo +++ b/comms/py-colorama/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.8 2021/01/03 21:51:46 adam Exp $ +$NetBSD: distinfo,v 1.9 2021/01/09 00:43:43 mef Exp $ SHA1 (colorama-0.4.4.tar.gz) = 4591cc4448b3b23dfc958e997b7622e066a57132 RMD160 (colorama-0.4.4.tar.gz) = 7b2251157a315d0fd9d592b838a32d9bf7a6fddc SHA512 (colorama-0.4.4.tar.gz) = 84db73bed5a6d4ab1624bdbeea65aef2061126e730f9d4a853f3b2504b9ebf5eb7c0649024ec687b538a89c20c83a5f3365d4fb1aba9fdba3db0b375942c48f4 Size (colorama-0.4.4.tar.gz) = 27813 bytes +SHA1 (patch-setup.py) = aba7883e6c6c2514e70d0e0e12417186bc01f1a3 diff --git a/comms/py-colorama/patches/patch-setup.py b/comms/py-colorama/patches/patch-setup.py new file mode 100644 index 00000000000..9cf2f7f24d4 --- /dev/null +++ b/comms/py-colorama/patches/patch-setup.py @@ -0,0 +1,34 @@ +$NetBSD: patch-setup.py,v 1.1 2021/01/09 00:43:43 mef Exp $ + +This patch is necessary only for python-3.6 + +Traceback (most recent call last): + 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/pkg/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 + +--- setup.py.orig 2020-10-13 06:22:32.000000000 +0900 ++++ setup.py 2021-01-09 09:24:27.258231596 +0900 +@@ -5,6 +5,8 @@ from __future__ import with_statement + + import os + import re ++import sys ++ + try: + from setuptools import setup + except ImportError: +@@ -15,7 +17,7 @@ NAME = 'colorama' + + + def read_file(path): +- with open(os.path.join(os.path.dirname(__file__), path)) as fp: ++ with open(os.path.join(os.path.dirname(__file__), path), **({'encoding': 'UTF-8'} if sys.version_info.major>=3 else {})) as fp: + return fp.read() + + def _get_version_match(content): |