pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/comms/py-colorama (comms/py-colorama) Add patch for py...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f16b81cda84c
branches:  trunk
changeset: 444485:f16b81cda84c
user:      mef <mef%pkgsrc.org@localhost>
date:      Sat Jan 09 00:43:43 2021 +0000

description:
(comms/py-colorama) Add patch for py36, can't decode byte 0xc2

diffstat:

 comms/py-colorama/distinfo               |   3 +-
 comms/py-colorama/patches/patch-setup.py |  34 ++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletions(-)

diffs (50 lines):

diff -r b820f7d91ee1 -r f16b81cda84c comms/py-colorama/distinfo
--- a/comms/py-colorama/distinfo        Fri Jan 08 23:47:54 2021 +0000
+++ b/comms/py-colorama/distinfo        Sat Jan 09 00:43:43 2021 +0000
@@ -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 -r b820f7d91ee1 -r f16b81cda84c comms/py-colorama/patches/patch-setup.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/py-colorama/patches/patch-setup.py  Sat Jan 09 00:43:43 2021 +0000
@@ -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):



Home | Main Index | Thread Index | Old Index