diff options
-rw-r--r-- | textproc/py-sphinx-inline-tabs/Makefile | 9 | ||||
-rw-r--r-- | textproc/py-sphinx-inline-tabs/files/patch-src-sphinx_inline_tabs-_impl.py | 15 |
2 files changed, 23 insertions, 1 deletions
diff --git a/textproc/py-sphinx-inline-tabs/Makefile b/textproc/py-sphinx-inline-tabs/Makefile index 3b34d7575f03..a23c6d7a3aae 100644 --- a/textproc/py-sphinx-inline-tabs/Makefile +++ b/textproc/py-sphinx-inline-tabs/Makefile @@ -2,6 +2,7 @@ PORTNAME= sphinx-inline-tabs PORTVERSION= 2021.4.11b9 +PORTREVISION= 1 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -20,4 +21,10 @@ USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +.if ${PYTHON_REL} < 3800 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR} +.endif + +.include <bsd.port.post.mk> diff --git a/textproc/py-sphinx-inline-tabs/files/patch-src-sphinx_inline_tabs-_impl.py b/textproc/py-sphinx-inline-tabs/files/patch-src-sphinx_inline_tabs-_impl.py new file mode 100644 index 000000000000..b98a87c5bb3d --- /dev/null +++ b/textproc/py-sphinx-inline-tabs/files/patch-src-sphinx_inline_tabs-_impl.py @@ -0,0 +1,15 @@ +--- src/sphinx_inline_tabs/_impl.py.orig 2021-04-11 11:03:11 UTC ++++ src/sphinx_inline_tabs/_impl.py +@@ -1,7 +1,11 @@ + """The actual implementation.""" + + import itertools +-from typing import List, Literal ++from typing import List ++try: ++ from typing import Literal ++except ImportError: ++ from typing_extensions import Literal + + from docutils import nodes + from docutils.parsers.rst import directives |