From 72e1c8229e248095b6b3667c64d29e37e0e94672 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Fri, 28 Feb 2025 03:29:15 -0800 Subject: [PATCH] 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