diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-05-16 23:14:34 +0800 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-05-16 23:24:10 +0800 |
commit | 4e0b1f60aa3d89e25e532448e4ea538f3f23823a (patch) | |
tree | 4d583baa6b947cc39522d22bb397b8fa1aea8785 | |
parent | devel/py-oslo.vmware: Update to 3.9.0 (diff) |
textproc/py-sphinx-inline-tabs: Complete the fix for Python 3.6 and 3.7
- Bump PORTREVISION for dependency and package change
Reported by: fluffy
-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 |