git: a5a598dbb11b - main - devel/py-cerberus: fix license, tests

From: Matthew Seaman <matthew_at_FreeBSD.org>
Date: Wed, 22 Mar 2023 11:06:39 UTC
The branch main has been updated by matthew:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a5a598dbb11b98d77f8a8a3fce9ed439b174ce01

commit a5a598dbb11b98d77f8a8a3fce9ed439b174ce01
Author:     Matthew Seaman <matthew@FreeBSD.org>
AuthorDate: 2023-03-22 11:01:10 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2023-03-22 11:06:31 +0000

    devel/py-cerberus: fix license, tests
    
    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.
---
 devel/py-cerberus/Makefile | 17 +++++++++++------
 devel/py-cerberus/distinfo |  2 +-
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/devel/py-cerberus/Makefile b/devel/py-cerberus/Makefile
index eca1457c57b4..efad329a4801 100644
--- a/devel/py-cerberus/Makefile
+++ b/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}
@@ -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>
diff --git a/devel/py-cerberus/distinfo b/devel/py-cerberus/distinfo
index 182ebd7192a5..ab03f0c07171 100644
--- a/devel/py-cerberus/distinfo
+++ b/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