git: 404f1e6ae108 - main - www/py-flask: Add two options and set default, make test success
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 30 Aug 2025 13:23:38 UTC
The branch main has been updated by wen:
URL: https://cgit.FreeBSD.org/ports/commit/?id=404f1e6ae1083a363a8bd7355a763791e3c3d824
commit 404f1e6ae1083a363a8bd7355a763791e3c3d824
Author: Wen Heping <wen@FreeBSD.org>
AuthorDate: 2025-08-30 13:21:06 +0000
Commit: Wen Heping <wen@FreeBSD.org>
CommitDate: 2025-08-30 13:23:07 +0000
www/py-flask: Add two options and set default, make test success
---
www/py-flask/Makefile | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/www/py-flask/Makefile b/www/py-flask/Makefile
index e793360736d2..4e3fee0e633d 100644
--- a/www/py-flask/Makefile
+++ b/www/py-flask/Makefile
@@ -1,5 +1,6 @@
PORTNAME= flask
DISTVERSION= 3.1.2
+PORTREVISION= 1
CATEGORIES= www python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -19,19 +20,24 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}werkzeug>=3.1:www/py-werkzeug@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}blinker>=1.9:devel/py-blinker@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
-USES= cpe python
+USES= cpe python:3.10+
CPE_VENDOR= palletsprojects
USE_PYTHON= pep517 concurrent autoplist
NO_ARCH= yes
-do-test:
- @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
+OPTIONS_DEFINE= ASYNC DOTENV
+OPTIONS_DEFAULT=ASYNC DOTENV
+
+ASYNC_DESC= Enable async
+ASYNC_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}asgiref>=3.2:www/py-asgiref@${PY_FLAVOR}
-.include <bsd.port.pre.mk>
+DOTENV_DESC= Enable dotenv
+DOTENV_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-dotenv>=0:www/py-python-dotenv@${PY_FLAVOR}
-.if ${PYTHON_REL} < 31000
-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=3.6.0:devel/py-importlib-metadata@${PY_FLAVOR}
-.endif
+.include <bsd.port.options.mk>
+
+do-test:
+ @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>