git: bb9bbfaa247d - main - textproc/py-sphinxcontrib-autoprogram: unbreak with python 3.14+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 22 Sep 2026 18:39:02 UTC
The branch main has been updated by fluffy:
URL: https://cgit.FreeBSD.org/ports/commit/?id=bb9bbfaa247d49ba526d9332c4e0c32585e18418
commit bb9bbfaa247d49ba526d9332c4e0c32585e18418
Author: Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2026-09-22 18:35:59 +0000
Commit: Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2026-09-22 18:35:59 +0000
textproc/py-sphinxcontrib-autoprogram: unbreak with python 3.14+
Python 3.14 has dropped deprecated Str attribute from ast module
Fixes error "AttributeError: module 'ast' has no attribute 'Str'"
Approved by: portmgr blanket
---
textproc/py-sphinxcontrib-autoprogram/Makefile | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/textproc/py-sphinxcontrib-autoprogram/Makefile b/textproc/py-sphinxcontrib-autoprogram/Makefile
index 5f93d11e86e4..b5cdcbfcc539 100644
--- a/textproc/py-sphinxcontrib-autoprogram/Makefile
+++ b/textproc/py-sphinxcontrib-autoprogram/Makefile
@@ -24,9 +24,18 @@ OPTIONS_DEFINE= DOCS
DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=1.2,1:textproc/py-sphinx@${PY_FLAVOR}
DOCS_PORTDOCS= *
+.include <bsd.port.pre.mk>
+
post-extract:
@(cd ${BUILD_WRKSRC}; ${RM} sphinxcontrib/__init__.py;)
+.if ${PYTHON_REL} >= 31400
+post-patch:
+ ${REINPLACE_CMD} -e "s/node.value.s/node.value.value/g" \
+ -e "s/ast.Str/ast.Constant/g" \
+ ${WRKSRC}/doc/conf.py
+.endif
+
pre-build-DOCS-on:
@(cd ${BUILD_WRKSRC}; \
${SETENVI} ${WRK_ENV} \
@@ -44,4 +53,4 @@ do-test:
${SETENV} ${MAKE_ENV} \
${PYTHON_CMD} -m unittest -v sphinxcontrib/autoprogram.py
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>