git: 8731e3328335 - main - python.mk: add USE_PYTHON=cython_test

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Thu, 09 Mar 2023 04:25:15 UTC
The branch main has been updated by vishwin:

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

commit 8731e33283354423faea74ea96a6431d7441eaba
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2023-03-09 04:24:47 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2023-03-09 04:24:47 +0000

    python.mk: add USE_PYTHON=cython_test
---
 Mk/Uses/python.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index 1ed76079cbc9..901261333b87 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -86,6 +86,8 @@
 #
 #	cython_run	- Depend on lang/cython at run-time.
 #
+#	cython_test	- Depend on lang/cython for tests.
+#
 #	flavors		- Force creation of flavors for Python 2 and 3 default
 #			  versions, where applicable.
 #
@@ -307,7 +309,7 @@ _PYTHON_BASECMD=		${LOCALBASE}/bin/python
 _PYTHON_RELPORTDIR=		lang/python
 
 # List all valid USE_PYTHON features here
-_VALID_PYTHON_FEATURES=	allflavors autoplist concurrent cython cython_run \
+_VALID_PYTHON_FEATURES=	allflavors autoplist concurrent cython cython_run cython_test \
 			distutils flavors noegginfo noflavors nose nose2 \
 			optsuffix pep517 py3kplist pytest pytest4 pythonprefix \
 			unittest unittest2
@@ -585,6 +587,10 @@ BUILD_DEPENDS+=	cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR}
 RUN_DEPENDS+=	cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR}
 .  endif
 
+.  if defined(_PYTHON_FEATURE_CYTHON_TEST)
+TEST_DEPENDS+=	cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR}
+.  endif
+
 .  if defined(_PYTHON_FEATURE_CONCURRENT)
 .    if !defined(_PYTHON_FEATURE_FLAVORS) && (${_PYTHON_VERSION_MINIMUM:M3*} || ${_PYTHON_VERSION_MAXIMUM:M2*})
 DEV_WARNING+=	"USE_PYTHON=concurrent when only one of Python 2 or 3 is supported AND not using flavors does not make any sense"