git: 7dbf50806b78 - main - www/py-puppetboard: Update to 4.0.3

From: Romain Tartière <romain_at_FreeBSD.org>
Date: Sun, 31 Jul 2022 17:47:51 UTC
The branch main has been updated by romain:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7dbf50806b78b2958e59433d807e4e4393dc2c1e

commit 7dbf50806b78b2958e59433d807e4e4393dc2c1e
Author:     Romain Tartière <romain@FreeBSD.org>
AuthorDate: 2022-07-31 17:40:27 +0000
Commit:     Romain Tartière <romain@FreeBSD.org>
CommitDate: 2022-07-31 17:47:28 +0000

    www/py-puppetboard: Update to 4.0.3
    
    * Update and fix dependencies;
    * Ship a wsgi.py sample to run the application;
    * Remove outdated CONFLICTS;
    
    With hat:       puppet
---
 www/py-puppetboard/Makefile                | 33 +++++++++++++++++++-----------
 www/py-puppetboard/distinfo                |  6 +++---
 www/py-puppetboard/files/wsgi.py.sample.in | 11 ++++++++++
 3 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/www/py-puppetboard/Makefile b/www/py-puppetboard/Makefile
index 11973e9a4b05..8a994cb5b834 100644
--- a/www/py-puppetboard/Makefile
+++ b/www/py-puppetboard/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	puppetboard
-PORTVERSION=	4.0.1
+PORTVERSION=	4.0.3
 DISTVERSIONPREFIX=	v
 CATEGORIES=	www python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -10,31 +10,40 @@ COMMENT=	Web interface to PuppetDB
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}CommonMark>=0.7.2:textproc/py-CommonMark@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}Flask>=0.12:www/py-flask@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}Flask-WTF>=0.14.2:www/py-flask-wtf@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}markupsafe>=0.19:textproc/py-markupsafe@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}future>=0.16.0:devel/py-future@${PY_FLAVOR} \
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}CommonMark>=0.9.1:textproc/py-CommonMark@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}Flask-WTF>=0:www/py-flask-wtf@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}Flask>=2:www/py-flask@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}Jinja2>=3:devel/py-Jinja2@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}itsdangerous>=2:security/py-itsdangerous@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}markupsafe>=2:textproc/py-markupsafe@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}packaging>=21.3:devel/py-packaging@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyparsing>=3.0.9:devel/py-pyparsing@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pypuppetdb>=0.3.3:databases/py-pypuppetdb@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}requests>=2.13.0:www/py-requests@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}requests>=2.13.0:www/py-requests@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}werkzeug>=2:www/py-werkzeug@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wtforms>=0:textproc/py-wtforms@${PY_FLAVOR}
 
 USES=		python:3.6+
 USE_GITHUB=	yes
 USE_PYTHON=	autoplist distutils
 
-NO_ARCH=	yes
+SUB_LIST=	ETCDIR=${ETCDIR}
+SUB_FILES=	wsgi.py.sample
 
-CONFLICTS_INSTALL=puppetboard02 puppetboard03
+NO_ARCH=	yes
 
 GH_ACCOUNT=	voxpupuli
-PLIST_FILES=	"@sample etc/puppetboard/settings.py.sample"
+PLIST_FILES=	"@sample etc/puppetboard/settings.py.sample" \
+		"@sample %%WWWDIR%%/wsgi.py.sample"
 
 post-patch:
 	${REINPLACE_CMD} -e '/requirements_for_tests/,+2d' \
 		${WRKSRC}/setup.py
 
 post-install:
-	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/puppetboard
-	${CP} ${WRKSRC}/settings.py.sample ${STAGEDIR}${PREFIX}/etc/puppetboard/settings.py.sample
+	${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${WRKSRC}/settings.py.sample ${STAGEDIR}${ETCDIR}
+	${MKDIR} ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} ${WRKDIR}/wsgi.py.sample ${STAGEDIR}${WWWDIR}
 
 .include <bsd.port.mk>
diff --git a/www/py-puppetboard/distinfo b/www/py-puppetboard/distinfo
index 15071e4e20d2..caf3cf1b5f58 100644
--- a/www/py-puppetboard/distinfo
+++ b/www/py-puppetboard/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1657311310
-SHA256 (voxpupuli-puppetboard-v4.0.1_GH0.tar.gz) = 4d19ebcb0dfc69c63b581587c9a2362ce7b26e823ada9dd0352458e1c83be9b7
-SIZE (voxpupuli-puppetboard-v4.0.1_GH0.tar.gz) = 4399183
+TIMESTAMP = 1659123484
+SHA256 (voxpupuli-puppetboard-v4.0.3_GH0.tar.gz) = 071ca093af13a4e0f4ca4dc100883739342c6baae917f6582c44ed0d20b187c7
+SIZE (voxpupuli-puppetboard-v4.0.3_GH0.tar.gz) = 4399861
diff --git a/www/py-puppetboard/files/wsgi.py.sample.in b/www/py-puppetboard/files/wsgi.py.sample.in
new file mode 100644
index 000000000000..a317fdf04a29
--- /dev/null
+++ b/www/py-puppetboard/files/wsgi.py.sample.in
@@ -0,0 +1,11 @@
+from __future__ import absolute_import
+import os
+
+# Uncomment to enable logging
+# import logging
+# logging.basicConfig(filename='/var/log/puppetboard/puppetboard.log', level=logging.INFO)
+
+# Indicate where to find the configuration file
+os.environ['PUPPETBOARD_SETTINGS'] = '%%ETCDIR%%/settings.py'
+
+from puppetboard.app import app as application