git: 72e1c8229e24 - main - science/py-ncrystal: Enable executables; Add test target
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 28 Feb 2025 11:29:43 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=72e1c8229e248095b6b3667c64d29e37e0e94672
commit 72e1c8229e248095b6b3667c64d29e37e0e94672
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-02-28 11:29:15 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-02-28 11:29:41 +0000
science/py-ncrystal: Enable executables; Add test target
---
science/py-ncrystal/Makefile | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/science/py-ncrystal/Makefile b/science/py-ncrystal/Makefile
index 43f070aff5f9..bcf0c0b51f5e 100644
--- a/science/py-ncrystal/Makefile
+++ b/science/py-ncrystal/Makefile
@@ -1,6 +1,7 @@
PORTNAME= ncrystal
DISTVERSIONPREFIX= v
DISTVERSION= 4.1.2
+PORTREVISION= 1
CATEGORIES= science # physics
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -18,20 +19,22 @@ BUILD_DEPENDS= ${PY_SETUPTOOLS} \
RUN_DEPENDS= ${PYNUMPY}
USES= python
-USE_PYTHON= pep517 autoplist
+USE_PYTHON= pep517 concurrent autoplist
USE_GITHUB= yes
GH_ACCOUNT= mctools
-POST_PLIST= fix-plist
+TEST_ENV= ${MAKE_ENV} \
+ PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
+ PATH=${STAGEDIR}${PREFIX}/bin:${PATH}
+#TEST_WRKSRC= ${WRKSRC}/ncrystal_python
post-install:
- # delete scripts (they are installed by science/ncrystal)
- @${RM} ${STAGEDIR}${PREFIX}/bin/*
# strip binary
#@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/NCrystal/ncrystal_pyinst_data/lib/libNCrystal.so
-fix-plist: # see post-install
- @${REINPLACE_CMD} -e "s|^bin/.*$$||" ${TMPPLIST}
+do-test: # the third test fails for an unknown reason
+ @cd ${TEST_WRKSRC} && \
+ ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m NCrystal.test all
.include <bsd.port.mk>