pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/finance/py-eth-hash (finance/py-eth-hash) build fix fo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3bec42428c92
branches:  trunk
changeset: 447070:3bec42428c92
user:      mef <mef%pkgsrc.org@localhost>
date:      Mon Feb 15 14:59:25 2021 +0000

description:
(finance/py-eth-hash) build fix for py36 (only)

py36 gives following flag:
Traceback (most recent call last):
  File "setup.py", line 50, in <module>
    long_description = readme.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 0xe2 in position 2861: ordinal not in range(128)

diffstat:

 finance/py-eth-hash/distinfo               |   3 ++-
 finance/py-eth-hash/patches/patch-setup.py |  23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletions(-)

diffs (39 lines):

diff -r fe2689abbd38 -r 3bec42428c92 finance/py-eth-hash/distinfo
--- a/finance/py-eth-hash/distinfo      Mon Feb 15 14:52:48 2021 +0000
+++ b/finance/py-eth-hash/distinfo      Mon Feb 15 14:59:25 2021 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2021/02/07 19:59:48 adam Exp $
+$NetBSD: distinfo,v 1.3 2021/02/15 14:59:25 mef Exp $
 
 SHA1 (eth-hash-0.3.1.tar.gz) = b1e90d8d74ae1b5a85b74ac922232876734eda4e
 RMD160 (eth-hash-0.3.1.tar.gz) = 57c7e5b67d80d181e3a03b5149f80efe827bae6c
 SHA512 (eth-hash-0.3.1.tar.gz) = 083aea8d1f6b0119bbdb4e52238ae614b8705794446a030eb1a0b60f6811c158b9613bf977c7f26151d4b00920941fa836e28ca7260505bda54e4f5da8f6b382
 Size (eth-hash-0.3.1.tar.gz) = 5289683 bytes
+SHA1 (patch-setup.py) = 8da4ca9fdd58577c627df6662a3799d88e414138
diff -r fe2689abbd38 -r 3bec42428c92 finance/py-eth-hash/patches/patch-setup.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/py-eth-hash/patches/patch-setup.py        Mon Feb 15 14:59:25 2021 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-setup.py,v 1.1 2021/02/15 14:59:25 mef Exp $
+
+py36 gives following flag:
+UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2861: ordinal not in range(128)
+
+--- setup.py.orig      2021-01-22 04:52:10.000000000 +0900
++++ setup.py   2021-02-15 23:50:09.430652835 +0900
+@@ -1,5 +1,6 @@
+ #!/usr/bin/env python
+ # -*- coding: utf-8 -*-
++import sys
+ from setuptools import (
+     setup,
+     find_packages,
+@@ -46,7 +47,7 @@ extras_require['dev'] = (
+ )
+ 
+ 
+-with open('./README.md') as readme:
++with open("./README.md", **({'encoding': 'UTF-8'} if sys.version_info.major>=3 else {})) as readme:
+     long_description = readme.read()
+ 
+ 



Home | Main Index | Thread Index | Old Index