devel/py-jsonschema: Fix PLIST

- Switch to PEP517 and get rid of the setuptools workaround
- Add a missing dependency for Python 3.8 packages
- Simplify the test framework by using USE_PYTHON=pytest
- Bump PORTREVISION due changed package content.

PR:		270225
This commit is contained in:
Kai Knoblich 2023-03-15 06:02:24 -05:00 committed by Muhammad Moinur Rahman
parent 23607969b8
commit 34cd65b8b1
2 changed files with 10 additions and 76 deletions

View file

@ -1,5 +1,6 @@
PORTNAME= jsonschema
PORTVERSION= 4.17.3
PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -11,13 +12,17 @@ WWW= https://github.com/Julian/jsonschema
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=3.4:devel/py-setuptools_scm@${PY_FLAVOR}
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}hatch-fancy-pypi-readme>=0:devel/py-hatch-fancy-pypi-readme@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0:devel/py-hatch-vcs@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}attrs>=17.4.0:devel/py-attrs@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyrsistent>=0.14.0:devel/py-pyrsistent@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tox>0:devel/py-tox@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pip>=0:devel/py-pip@${PY_FLAVOR}
USES= python:3.7+
USE_PYTHON= autoplist concurrent distutils
USE_PYTHON= autoplist concurrent pep517 pytest
TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR}
CONFLICTS_INSTALL= py*-jsonschema3 # bin/jsonschema
@ -26,7 +31,8 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
.if ${PYTHON_REL} < 30900
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-resources>=0:devel/py-importlib-resources@${PY_FLAVOR}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-resources>=0:devel/py-importlib-resources@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pkgutil-resolve-name>=0:devel/py-pkgutil-resolve-name@${PY_FLAVOR}
.endif
.if ${PYTHON_REL} < 30800
@ -34,7 +40,4 @@ RUN_DEPEDNS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-me
${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR}
.endif
do-test:
cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m tox
.include <bsd.port.post.mk>

File diff suppressed because one or more lines are too long