Date: Sat, 18 May 2019 15:46:37 +0000 (UTC) From: Kubilay Kocak <koobs@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r501964 - in head/devel/py-cbor2: . files Message-ID: <201905181546.x4IFkb0B078507@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: koobs Date: Sat May 18 15:46:36 2019 New Revision: 501964 URL: https://svnweb.freebsd.org/changeset/ports/501964 Log: devel/py-cbor2: Remove Python 3 support restriction This package supports Python 3.x support, so allow it accordingly. It is required for an upcoming www/py-autobahn update (Python 2/3 compatible). During QA, a UnicodeDecodeError was observed running tests under Python 3: File "/usr/local/lib/python3.6/site-packages/py/_vendored_packages/iniconfig.py", line 82, in _parse for lineno, line in enumerate(line_iter): File "/usr/local/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 0xc3 in position 165: ordinal not in range(128) pytest uses the py package, which vendors the iniconfig package, which isn't unicode aware [1][2][3]. Patch out unicode characters from setup.cfg accordingly until it's resolved. While investigating the cause of the above issue, a fix for setup.cfg's encoding was identified, which removes the need to set the locale via USE_LOCALE so remove it accordingly. While I'm here: - Pet portlint, spurious space at end of line in pkg-descr - Add LICENSE_FILE/TEST_DEPENDS/test target/NO_ARCH [1] https://github.com/pytest-dev/pytest/issues/3799 [2] https://github.com/RonnyPfannschmidt/iniconfig/issues/5 [3] https://github.com/RonnyPfannschmidt/iniconfig/issues/4 portlint: OK (looks fine.) porttest: OK (poudriere: 12amd64{py36,py27}) maketest: 215 passed, 1 skipped in 3.29 seconds (Python 2.7) maketest: 209 passed, 7 skipped in 3.07 seconds (Python 3.6) Approved by: portmgr (blanket: ports/framework compliance) MFH: 2019Q2 Added: head/devel/py-cbor2/files/ head/devel/py-cbor2/files/patch-setup.cfg (contents, props changed) Modified: head/devel/py-cbor2/Makefile head/devel/py-cbor2/pkg-descr Modified: head/devel/py-cbor2/Makefile ============================================================================== --- head/devel/py-cbor2/Makefile Sat May 18 14:43:34 2019 (r501963) +++ head/devel/py-cbor2/Makefile Sat May 18 15:46:36 2019 (r501964) @@ -3,6 +3,7 @@ PORTNAME= cbor2 PORTVERSION= 4.1.2 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,12 +12,17 @@ MAINTAINER= dvl@FreeBSD.org COMMENT= Pure Python CBOR (de)serializer with extensive tag support LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.txt -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=1.7.0:devel/py-setuptools_scm@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} -USES= python:2.7 +USES= python USE_PYTHON= autoplist concurrent distutils -USE_LOCALE= en_US.UTF-8 +NO_ARCH= yes + +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs .include <bsd.port.mk> Added: head/devel/py-cbor2/files/patch-setup.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-cbor2/files/patch-setup.cfg Sat May 18 15:46:36 2019 (r501964) @@ -0,0 +1,37 @@ +# Added encoding declaration to setup.cfg +# https://github.com/agronholm/cbor2/commit/ba05c122 +# https://github.com/agronholm/cbor2/issues/38 + +# pytest uses py which vendors iniconfig, which isn't unicode aware +# Patch out unicode characters for now +# https://github.com/pytest-dev/pytest/issues/3799 +# https://github.com/RonnyPfannschmidt/iniconfig/issues/5 +# https://github.com/RonnyPfannschmidt/iniconfig/issues/4 + +# coverage is not a compulsory dependency +# this block clobbers ports pytest args + +--- setup.cfg.orig 2018-12-10 13:39:24 UTC ++++ setup.cfg +@@ -1,8 +1,9 @@ ++# coding: utf-8 + [metadata] + name = cbor2 + description = Pure Python CBOR (de)serializer with extensive tag support + long_description = file: README.rst +-author = Alex Grönholm ++author = Alex Gronholm + author_email = alex.gronholm@nextday.fi + project_urls = + Documentation = https://cbor2.readthedocs.org/en/latest/ +@@ -30,10 +31,6 @@ packages = find: + test = + pytest + pytest-cov +- +-[tool:pytest] +-addopts = -rsx --cov --tb=short +-testpaths = tests + + [coverage:run] + source = cbor2 Modified: head/devel/py-cbor2/pkg-descr ============================================================================== --- head/devel/py-cbor2/pkg-descr Sat May 18 14:43:34 2019 (r501963) +++ head/devel/py-cbor2/pkg-descr Sat May 18 15:46:36 2019 (r501964) @@ -5,7 +5,7 @@ There exists another Python CBOR implementation (cbor) CPython due to its C extensions. On PyPy, cbor2 and cbor are almost identical in performance. The other implementation also lacks documentation and a comprehensive test suite, does not support most standard extension tags and is -known to crash (segfault) when passed a cyclic structure (say, a list +known to crash (segfault) when passed a cyclic structure (say, a list containing itself). WWW: https://pypi.org/project/cbor2/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905181546.x4IFkb0B078507>