1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00
freebsd-ports/textproc/py-jq/Makefile
Matthias Andree c45834e17f textproc/py-jq: update to v1.2.1
Adds Python 3.10 support (see [1]), else see the
Changelog:
https://github.com/mwilliamson/jq.py/blob/1.2.1/CHANGELOG.rst#changelog

Note that Python 3.10 cannot currently execute self-tests,
assistance solicited:

______ ERROR collecting tests/jq_old_tests.py _____
<frozen importlib._bootstrap>:939: in _find_spec
    ???
E   AttributeError: 'AssertionRewritingHook' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:
/usr/local/lib/python3.10/site-packages/py/_path/local.py:704: in pyimport
    __import__(modname)
<frozen importlib._bootstrap>:1027: in _find_and_load
    ???
<frozen importlib._bootstrap>:1002: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:941: in _find_spec
    ???
<frozen importlib._bootstrap>:915: in _find_spec_legacy
    ???
/usr/local/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:169: in find_module
    source_stat, co = _rewrite_test(self.config, fn_pypath)
/usr/local/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:406: in _rewrite_test
    co = compile(tree, fn.strpath, "exec", dont_inherit=True)
E   TypeError: required field "lineno" missing from alias
___________________________________________________

[1] 337c0f8baf
2021-08-07 17:34:53 +02:00

36 lines
1.2 KiB
Makefile

PORTNAME= jq
PORTVERSION= 1.2.1
CATEGORIES= textproc python
MASTER_SITES= CHEESESHOP LOCAL/mandree:mandree
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} jq-1.2.1-tests${EXTRACT_SUFX}:mandree
MAINTAINER= mandree@FreeBSD.org
COMMENT= jq.py: a lightweight and flexible JSON processor
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${RUN_DEPENDS}
LIB_DEPENDS= libjq.so:textproc/jq \
libonig.so:devel/oniguruma
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}certifi>=0:security/py-certifi@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
USES= localbase python:3.5+
USE_PYTHON= autoplist distutils
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/jq*.so
do-test:
cd ${WRKSRC} && ${SETENV} \
PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} \
${PYTHON_CMD} -m pytest -v tests/
.include <bsd.port.mk>