Support Python 3.6

This commit is contained in:
joerg 2020-08-27 12:32:48 +00:00
parent 9fe691ddce
commit 1587be844f
5 changed files with 47 additions and 5 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 2020/07/01 08:52:38 adam Exp $
# $NetBSD: Makefile,v 1.2 2020/08/27 12:32:48 joerg Exp $
DISTNAME= eliot-1.12.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
@ -18,6 +18,8 @@ TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=1.14.0:../../devel/py-hypothesis
TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
TEST_DEPENDS+= ${PYPKGPREFIX}-testtools-[0-9]*:../../devel/py-testtools
PYTHON_VERSIONS_INCOMPATIBLE= 27
.include "../../lang/python/pyversion.mk"
.if ${_PYTHON_VERSION} == 36
DEPENDS+= ${PYPKGPREFIX}-aiocontextvars-[0-9]*:../../devel/py-aiocontextvars
@ -25,8 +27,6 @@ DEPENDS+= ${PYPKGPREFIX}-aiocontextvars-[0-9]*:../../devel/py-aiocontextvars
USE_LANGUAGES= # none
PYTHON_VERSIONS_INCOMPATIBLE= 27
post-install:
cd ${DESTDIR}${PREFIX}/bin && \
${MV} eliot-prettyprint eliot-prettyprint-${PYVERSSUFFIX} || ${TRUE}

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.1 2020/07/01 08:52:38 adam Exp $
$NetBSD: distinfo,v 1.2 2020/08/27 12:32:48 joerg Exp $
SHA1 (eliot-1.12.0.tar.gz) = 19ea57fe203d94425a17fa54bf065d5cdd9189c6
RMD160 (eliot-1.12.0.tar.gz) = 0def7f7939383b901fa76a78e6da7b183a9edad8
SHA512 (eliot-1.12.0.tar.gz) = d0ca6cf5a1a9ffb615c495a816856bd80880ff2a2ef0cf37ee905ce32e7a81d6e0cb28e107bb38899eb295e86850006f60d036f484663e6c105e4d51a13feb3c
Size (eliot-1.12.0.tar.gz) = 152125 bytes
SHA1 (patch-setup.py) = b3e6232c987bf172302124dc9c7e6302ec26cea1

View file

@ -0,0 +1,20 @@
$NetBSD: patch-setup.py,v 1.1 2020/08/27 12:32:49 joerg Exp $
--- setup.py.orig 2020-08-26 11:49:30.118420576 +0000
+++ setup.py
@@ -1,13 +1,13 @@
from setuptools import setup
import versioneer
-
+import sys
def read(path):
"""
Read the contents of a file.
"""
- with open(path) as f:
+ with open(path, **({'encoding': 'UTF-8'} if sys.version_info.major>=3 else {})) as f:
return f.read()

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.1 2020/07/01 08:52:38 adam Exp $
$NetBSD: distinfo,v 1.2 2020/08/27 12:32:49 joerg Exp $
SHA1 (eliot-1.7.0.tar.gz) = af3854af2d937bdb7c4335aa968d639055eb134d
RMD160 (eliot-1.7.0.tar.gz) = a1748437d0d4884c64e62fdc24e50924a0054936
SHA512 (eliot-1.7.0.tar.gz) = da86e0c26e0bec13951d037902cdb761c96fdb043528b51e2801f07b9cc304265b20d841cecf82a206e15abacbe4d75e315003333a461a8bebb6c32a55bde07d
Size (eliot-1.7.0.tar.gz) = 152507 bytes
SHA1 (patch-setup.py) = ea0fbacf10edf09aeb6a518a37dfb807a541486f

View file

@ -0,0 +1,20 @@
$NetBSD: patch-setup.py,v 1.1 2020/08/27 12:32:49 joerg Exp $
--- setup.py.orig 2020-08-26 11:50:47.089756210 +0000
+++ setup.py
@@ -1,13 +1,14 @@
from setuptools import setup
import versioneer
+import sys
def read(path):
"""
Read the contents of a file.
"""
- with open(path) as f:
+ with open(path, **({'encoding': 'UTF-8'} if sys.version_info.major>=3 else {})) as f:
return f.read()