git: a26c07bdd4f6 - main - textproc/py-sentencepiece: Fix tests

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 21 Feb 2024 09:15:29 UTC
The branch main has been updated by yuri:

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

commit a26c07bdd4f693d701c51ba28256563285847dff
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-02-21 09:14:50 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-02-21 09:15:27 +0000

    textproc/py-sentencepiece: Fix tests
---
 textproc/py-sentencepiece/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/textproc/py-sentencepiece/Makefile b/textproc/py-sentencepiece/Makefile
index 083154938273..03109ff10315 100644
--- a/textproc/py-sentencepiece/Makefile
+++ b/textproc/py-sentencepiece/Makefile
@@ -15,13 +15,14 @@ BUILD_DEPENDS=	protobuf>0:devel/protobuf
 LIB_DEPENDS=	libsentencepiece.so:textproc/sentencepiece
 
 USES=		compiler:c++17-lang pkgconfig python
-USE_PYTHON=	distutils autoplist pytest # many tests fail, see https://github.com/google/sentencepiece/issues/977
+USE_PYTHON=	distutils autoplist
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	google
 
 WRKSRC_SUBDIR=	python
 
-TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+do-test:
+	@cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${PYSETUP} test
 
 .include <bsd.port.mk>