Skip to content

Commit

Permalink
devel/py-cerberus: fix license, tests
Browse files Browse the repository at this point in the history
Use correct license -- this is ISCL rather than MIT licensed.

Switch to PEP517 build

Fix pytest and switch to USE_PYTHON=pytest.  Disable benchmark tests
by removing them -- the PYPI distribution is missing modules imported
from those tests and results in no tests being runnable at all.
  • Loading branch information
infracaninophile committed Mar 22, 2023
1 parent 4308cde commit a5a598d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions devel/py-cerberus/Makefile
@@ -1,5 +1,6 @@
PORTNAME= Cerberus
PORTVERSION= 1.3.4
PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -8,19 +9,23 @@ MAINTAINER= matthew@FreeBSD.org
COMMENT= Lightweight, extensible validation tool for Python dictionaries
WWW= https://github.com/pyeve/cerberus

LICENSE= MIT
LICENSE= ISCL
LICENSE_FILE= ${WRKSRC}/LICENSE

TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}

NO_ARCH= yes
USES= python:3.6+
USE_PYTHON= autoplist concurrent distutils
USE_PYTHON= autoplist concurrent pep517 pytest

# benchmark tests are missing files not included in PYPI tarballs and
# break running pytest at all

post-patch:
${RM} ${WRKSRC}/cerberus/benchmarks/test_overall_performance_1.py
${RM} ${WRKSRC}/cerberus/benchmarks/test_overall_performance_2.py

# Not to be confused with devel/py-pycerberus which fulfils a quite
# different function.

do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test

.include <bsd.port.mk>
2 changes: 1 addition & 1 deletion devel/py-cerberus/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1620481313
TIMESTAMP = 1679481062
SHA256 (Cerberus-1.3.4.tar.gz) = d1b21b3954b2498d9a79edf16b3170a3ac1021df88d197dc2ce5928ba519237c
SIZE (Cerberus-1.3.4.tar.gz) = 63835

0 comments on commit a5a598d

Please sign in to comment.