git: 873ae47eff33 - main - science/py-dwave-samplers: Add tests

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 23 Aug 2022 18:33:59 UTC
The branch main has been updated by yuri:

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

commit 873ae47eff33f3075cb2609d7a21e90c7ad24326
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-23 18:33:34 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-23 18:33:53 +0000

    science/py-dwave-samplers: Add tests
---
 science/py-dwave-samplers/Makefile | 11 +++++++----
 science/py-dwave-samplers/distinfo |  6 +++---
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/science/py-dwave-samplers/Makefile b/science/py-dwave-samplers/Makefile
index e55999cce571..3cf98c394bd9 100644
--- a/science/py-dwave-samplers/Makefile
+++ b/science/py-dwave-samplers/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	dwave-samplers
 DISTVERSION=	1.0.0.dev1
 CATEGORIES=	science python # quantum-computing
-MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -15,17 +14,21 @@ PY_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dimod>0:science/py-dimod@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}reno>0:textproc/py-reno@${PY_FLAVOR}
 BUILD_DEPENDS=	${PY_DEPENDS}
 RUN_DEPENDS=	${PY_DEPENDS}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}parameterized>0:devel/py-parameterized@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_PYTHON=	distutils cython
+USE_PYTHON=	distutils cython unittest
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	dwavesystems
 
 TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_WRKSRC=	${WRKSRC}/tests
 
 post-install:
 	# fix file paths, workaround for https://github.com/dwavesystems/dwave-samplers/issues/31
 	@cd ${STAGEDIR}${PYTHON_SITELIBDIR} && ( \
 		for f in `${FIND} samplers -name "*.so"`; do \
-			echo "YURI moving $$f"; \
 			${MV} $$f dwave/$$f; \
 		done; \
 		${RM} -r samplers; \
@@ -33,7 +36,7 @@ post-install:
 	# strip binaries
 	@${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/samplers -name "*${PYTHON_EXT_SUFFIX}.so" | ${XARGS} ${STRIP_CMD}
 
-do-test:
+post-test:
 	@${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${FILESDIR}/example.py
 
 .include <bsd.port.mk>
diff --git a/science/py-dwave-samplers/distinfo b/science/py-dwave-samplers/distinfo
index aeff9a31ab27..3208652039b3 100644
--- a/science/py-dwave-samplers/distinfo
+++ b/science/py-dwave-samplers/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1660435305
-SHA256 (dwave-samplers-1.0.0.dev1.tar.gz) = 38ec9299851b37c65a6492e4fab4cd73f9426792f2a7641f66d28e8bc8d25e11
-SIZE (dwave-samplers-1.0.0.dev1.tar.gz) = 890511
+TIMESTAMP = 1661276791
+SHA256 (dwavesystems-dwave-samplers-1.0.0.dev1_GH0.tar.gz) = 857666cd71844051882d08ac43ad84c10c8b706e82130b9a9b35a11c38ebc9e8
+SIZE (dwavesystems-dwave-samplers-1.0.0.dev1_GH0.tar.gz) = 101171