From 48274e052371741a8fa540ae69bbe9cdb16e135f Mon Sep 17 00:00:00 2001 From: Alastair Hogge Date: Sun, 8 Mar 2026 14:47:56 +0800 Subject: [PATCH] devel/py-e3-testsuite: New Port e3-testsuite is a Python library built on top of e3-core. Its purpose it to provide building blocks for software projects to create testsuites in a simple way. https://pypi.org/project/e3-testsuite PR: 293521 --- devel/Makefile | 1 + devel/py-e3-testsuite/Makefile | 68 +++++++++++++++++++++++++++++++++ devel/py-e3-testsuite/distinfo | 3 ++ devel/py-e3-testsuite/pkg-descr | 4 ++ 4 files changed, 76 insertions(+) create mode 100644 devel/py-e3-testsuite/Makefile create mode 100644 devel/py-e3-testsuite/distinfo create mode 100644 devel/py-e3-testsuite/pkg-descr diff --git a/devel/Makefile b/devel/Makefile index fb9937c11aea..2c7fb16b36af 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4875,6 +4875,7 @@ SUBDIR += py-durus SUBDIR += py-dynrules SUBDIR += py-e3-core + SUBDIR += py-e3-testsuite SUBDIR += py-easydict SUBDIR += py-easyprocess SUBDIR += py-editables diff --git a/devel/py-e3-testsuite/Makefile b/devel/py-e3-testsuite/Makefile new file mode 100644 index 000000000000..a4e22434305b --- /dev/null +++ b/devel/py-e3-testsuite/Makefile @@ -0,0 +1,68 @@ +PORTNAME= e3-testsuite +DISTVERSION= 27.3 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION} + +MAINTAINER= ports@FreeBSD.org. +COMMENT= Generic testsuite framework in Python +WWW= https://pypi.org/project/e3-testsuite/ + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=61.0.0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}e3-core>0:devel/py-e3-core@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}e3-core>0:devel/py-e3-core@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent pep517 pytest + +EXTRACT_AFTER_ARGS= ${_DIST_EXCLUDES:S,^,--exclude ,} + +# Upstream ${DISTFILE} uses decimal over hyphen to separate the major and minor +# version +PEP517_INSTALL_CMD= ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} \ + --prefix ${PREFIX} \ + ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION:C|-|.|}*.whl + +NO_ARCH= yes + +# Conflicts with ${LOCALBASE}/lib/python3.11/site-packages/e3/py.typed from +# devel/py-e3-core, it can be inherited via devel/py-e3-core ${RUN_DEPENDS} +_DIST_EXCLUDES= src/e3/py.typed + +do-install: +# do-install copied from ${PORTSDIR}/Mk/python.mk, with modifications. The aim +# here is to duplicate the solution in ${PEP517_INSTALL_CMD} above + ${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + (cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD}) + ${PYTHON_CMD} -B ${PORTSDIR}/Mk/Scripts/strip_RECORD.py \ + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION:C|-|.|}*.dist-info/RECORD >> ${_PYTHONPKGLIST} + ${REINPLACE_CMD} \ + -e '/\.pyc$$/d' \ + -e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../etc/|etc/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../bin/|bin/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../include/|include/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../lib/|lib/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libdata/|libdata/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libexec/|libexec/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../man/|man/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../sbin/|sbin/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../share/|share/|' \ + ${_PYTHONPKGLIST} + (cd ${STAGEDIR}${PREFIX} && ${FIND} lib -name '*.pyc' >> ${_PYTHONPKGLIST}) + +do-test: +# Tests require e3-testsuite to function + (cd ${WRKSRC} && \ + ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \ + PATH=${STAGEDIR}${PREFIX}/bin/:${PATH} \ + ${PYTHON_CMD} -m pytest) + +.include diff --git a/devel/py-e3-testsuite/distinfo b/devel/py-e3-testsuite/distinfo new file mode 100644 index 000000000000..d6ce7d8c3166 --- /dev/null +++ b/devel/py-e3-testsuite/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1772330574 +SHA256 (e3_testsuite-27.3.tar.gz) = bf4d65997fe2dc4eb8b7a34dcafe1db85210628473365ee2aa1a013d7769d38e +SIZE (e3_testsuite-27.3.tar.gz) = 175923 diff --git a/devel/py-e3-testsuite/pkg-descr b/devel/py-e3-testsuite/pkg-descr new file mode 100644 index 000000000000..10a1be843216 --- /dev/null +++ b/devel/py-e3-testsuite/pkg-descr @@ -0,0 +1,4 @@ +e3-testsuite is a Python library built on top of e3-core. Its purpose it to +provide building blocks for software projects to create testsuites in a simple +way. This is a generic library, therefore, the targeted software does not need +to use Python. -- 2.53.0