aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2026-04-11 03:13:35 +0000
committerXin LI <delphij@FreeBSD.org>2026-04-11 03:14:04 +0000
commit73f60a4ef3384b88668b4f6f7c1bf26f55095c98 (patch)
tree934639116b296c5eda38bdfae0e61e357aa39d7f
parentdb42cb71f2a4f4bd6dba031a11b6bf843158f223 (diff)
textproc/py-sphinx: Fix build with Python 3.13+.
-rw-r--r--textproc/py-sphinx/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/textproc/py-sphinx/Makefile b/textproc/py-sphinx/Makefile
index 1f915a129027..9bbecbbd65bc 100644
--- a/textproc/py-sphinx/Makefile
+++ b/textproc/py-sphinx/Makefile
@@ -37,7 +37,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-applehelp>=0:textproc/py-sphin
${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}html5lib>=0:www/py-html5lib@${PY_FLAVOR}
-USES= python:3.10-3.12 # uses imghdr module
+USES= python:3.10+
USE_PYTHON= autoplist concurrent cython_test pep517 pytest
NO_ARCH= yes
@@ -51,4 +51,11 @@ PYTEST_BROKEN_TESTS= test_anchors_ignored \
# https://github.com/sphinx-doc/sphinx/issues/2395
EXTRACT_CMD= ${SETENV} LC_ALL=en_US.UTF-8 /usr/bin/bsdtar
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+# imghdr was removed from the standard library in Python 3.13
+.if ${PYTHON_REL} >= 31300
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}standard-imghdr>=3.13.0:devel/py-standard-imghdr@${PY_FLAVOR}
+.endif
+
+.include <bsd.port.post.mk>