git: 21fd9a9ed6fa - main - textproc/py-sphinx: Update to 4.3.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 11 Jan 2022 02:50:39 UTC
The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=21fd9a9ed6faf24e1befc1240a0cf91a609349c4 commit 21fd9a9ed6faf24e1befc1240a0cf91a609349c4 Author: Danilo G. Baio <dbaio@freebsd.org> AuthorDate: 2021-12-14 04:29:03 +0000 Commit: Yasuhiro Kimura <yasu@FreeBSD.org> CommitDate: 2022-01-11 02:48:50 +0000 textproc/py-sphinx: Update to 4.3.1 ChangeLog: https://github.com/sphinx-doc/sphinx/blob/v4.3.1/CHANGES PR: 257116 Approved by: python (dbaio) --- .../py-orange3-single-cell/files/patch-doc_conf.py | 10 ++++ deskutils/py-paperless/files/patch-docs_conf.py | 13 +++++ devel/py-pysdl2/pkg-plist | 2 +- lang/asis/files/patch-doc_share_conf.py | 40 +++++++++++++++ textproc/castxml/files/patch-doc_conf.py.in | 11 ++++ textproc/py-rstfmt/Makefile | 2 + textproc/py-sphinx/Makefile | 13 ++--- textproc/py-sphinx/distinfo | 6 +-- .../py-sphinx/files/patch-sphinx_util_typing.py | 58 ---------------------- 9 files changed, 85 insertions(+), 70 deletions(-) diff --git a/biology/py-orange3-single-cell/files/patch-doc_conf.py b/biology/py-orange3-single-cell/files/patch-doc_conf.py new file mode 100644 index 000000000000..a3ecb4c652db --- /dev/null +++ b/biology/py-orange3-single-cell/files/patch-doc_conf.py @@ -0,0 +1,10 @@ +# add_stylesheet() deprecated on Sphinx 4.0 +# https://www.sphinx-doc.org/en/master/extdev/deprecated.html +--- doc/conf.py.orig 2018-10-15 08:43:14 UTC ++++ doc/conf.py +@@ -288,4 +288,4 @@ texinfo_documents = [ + #texinfo_no_detailmenu = False + + def setup(app): +- app.add_stylesheet('style.css') ++ app.add_css_file('style.css') diff --git a/deskutils/py-paperless/files/patch-docs_conf.py b/deskutils/py-paperless/files/patch-docs_conf.py new file mode 100644 index 000000000000..4e490b5921a3 --- /dev/null +++ b/deskutils/py-paperless/files/patch-docs_conf.py @@ -0,0 +1,13 @@ +# add_stylesheet() deprecated on Sphinx 4.0 +# https://www.sphinx-doc.org/en/master/extdev/deprecated.html +--- docs/conf.py.orig 2019-01-27 13:48:05 UTC ++++ docs/conf.py +@@ -21,7 +21,7 @@ exec(open("../src/paperless/version.py").read()) + + # Believe it or not, this is the officially sanctioned way to add custom CSS. + def setup(app): +- app.add_stylesheet("custom.css") ++ app.add_css_file("custom.css") + + # If extensions (or modules to document with autodoc) are in another directory, + # add these directories to sys.path here. If the directory is relative to the diff --git a/devel/py-pysdl2/pkg-plist b/devel/py-pysdl2/pkg-plist index b3cbbb36432d..2d351708e6de 100644 --- a/devel/py-pysdl2/pkg-plist +++ b/devel/py-pysdl2/pkg-plist @@ -52,7 +52,7 @@ %%PORTDOCS%%%%DOCSDIR%%/_static/pygments.css %%PORTDOCS%%%%DOCSDIR%%/_static/searchtools.js %%PORTDOCS%%%%DOCSDIR%%/_static/sidebar.js -%%PORTDOCS%%%%DOCSDIR%%/_static/underscore-1.12.0.js +%%PORTDOCS%%%%DOCSDIR%%/_static/underscore-1.13.1.js %%PORTDOCS%%%%DOCSDIR%%/_static/underscore.js %%PORTDOCS%%%%DOCSDIR%%/copying.html %%PORTDOCS%%%%DOCSDIR%%/faq.html diff --git a/lang/asis/files/patch-doc_share_conf.py b/lang/asis/files/patch-doc_share_conf.py new file mode 100644 index 000000000000..34ad101782c8 --- /dev/null +++ b/lang/asis/files/patch-doc_share_conf.py @@ -0,0 +1,40 @@ +--- doc/share/conf.py.orig 2016-03-31 12:55:10 UTC ++++ doc/share/conf.py +@@ -40,17 +40,17 @@ def get_gnat_version(): + line = (vinfo.readline()).strip() + return line + except: +- print 'Error opening or reading version_information file' ++ print('Error opening or reading version_information file') + sys.exit(1) + + # First retrieve the name of the documentation we are building + doc_name = os.environ.get('DOC_NAME', None) + if doc_name is None: +- print 'DOC_NAME environment variable should be set' ++ print('DOC_NAME environment variable should be set') + sys.exit(1) + + if doc_name not in DOCS: +- print '%s is not a valid documentation name' % doc_name ++ print(f'{doc_name} is not a valid documentation name') + sys.exit(1) + + +@@ -59,7 +59,7 @@ exclude_patterns = [] + for d in os.listdir(root_source_dir): + if d not in ('share', doc_name, doc_name + '.rst'): + exclude_patterns.append(d) +- print 'ignoring %s' % d ++ print(f'ignoring {d}') + + extensions = [] + templates_path = ['_templates'] +@@ -101,5 +101,5 @@ texinfo_documents = [ + + + def setup(app): +- app.add_lexer('ada', ada_pygments.AdaLexer()) +- app.add_lexer('gpr', ada_pygments.GNATProjectLexer()) ++ app.add_lexer('ada', ada_pygments.AdaLexer) ++ app.add_lexer('gpr', ada_pygments.GNATProjectLexer) diff --git a/textproc/castxml/files/patch-doc_conf.py.in b/textproc/castxml/files/patch-doc_conf.py.in new file mode 100644 index 000000000000..095153b6b598 --- /dev/null +++ b/textproc/castxml/files/patch-doc_conf.py.in @@ -0,0 +1,11 @@ +--- doc/conf.py.in.orig 2018-11-15 20:05:42 UTC ++++ doc/conf.py.in +@@ -52,7 +52,7 @@ for fpath in castxml_manuals: + name, desc, [], int(sec))) + else: + sys.stderr.write("ERROR: No castxml-manual-description in '%s'\n" % fpath) +- except Exception, e: ++ except Exception as e: + sys.stderr.write("ERROR: %s\n" % str(e)) + man_show_urls = False + diff --git a/textproc/py-rstfmt/Makefile b/textproc/py-rstfmt/Makefile index ba26c4d6ed72..849b41bebcdf 100644 --- a/textproc/py-rstfmt/Makefile +++ b/textproc/py-rstfmt/Makefile @@ -10,6 +10,8 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE # Sphinix should be < 4.0 for now: https://github.com/dzhu/rstfmt/issues/12 +BROKEN= Doesn't work with Sphinx 4 or greater + RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiohttp>=3.3.2:www/py-aiohttp@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}black>=19.10b0:devel/py-black@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinx>=2.4.0,1<4.0,1:textproc/py-sphinx@${PY_FLAVOR} diff --git a/textproc/py-sphinx/Makefile b/textproc/py-sphinx/Makefile index ff770294de6a..d238d37d5943 100644 --- a/textproc/py-sphinx/Makefile +++ b/textproc/py-sphinx/Makefile @@ -1,8 +1,7 @@ # Created by: Li-Wen Hsu <lwhsu@FreeBSD.org> PORTNAME= sphinx -PORTVERSION= 3.5.2 -PORTREVISION= 1 +PORTVERSION= 4.3.1 PORTEPOCH= 1 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP @@ -22,12 +21,12 @@ LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-applehelp>=0:textproc/py-sphinxcontrib-applehelp@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-devhelp>=0:textproc/py-sphinxcontrib-devhelp@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-jsmath>=0:textproc/py-sphinxcontrib-jsmath@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-htmlhelp>=0:textproc/py-sphinxcontrib-htmlhelp@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-serializinghtml>=0:textproc/py-sphinxcontrib-serializinghtml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-htmlhelp>=2.0.0:textproc/py-sphinxcontrib-htmlhelp@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-serializinghtml>=1.1.5:textproc/py-sphinxcontrib-serializinghtml@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-qthelp>=0:textproc/py-sphinxcontrib-qthelp@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}Jinja2>=2.3:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pygments>=2.0:textproc/py-pygments@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}docutils>=0.12:textproc/py-docutils@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}docutils>=0.14<0.18,1:textproc/py-docutils@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}snowballstemmer>=1.1:textproc/py-snowballstemmer@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}Babel>=1.3:devel/py-babel@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}alabaster>=0.7<0.8:textproc/py-alabaster@${PY_FLAVOR} \ @@ -45,14 +44,12 @@ TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAV USES= python:3.5+ USE_PYTHON= autoplist distutils concurrent -CONFLICTS_INSTALL= py*-sphinx18 - NO_ARCH= yes # Upstream archive contains files with UTF-8 names (#246618) EXTRACT_CMD= ${SETENV} LC_ALL=en_US.UTF-8 /usr/bin/bsdtar do-test: - @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts= + @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts= -k 'not test_ext_imgconverter' .include <bsd.port.mk> diff --git a/textproc/py-sphinx/distinfo b/textproc/py-sphinx/distinfo index 7845a2f08750..b83554361786 100644 --- a/textproc/py-sphinx/distinfo +++ b/textproc/py-sphinx/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1615136512 -SHA256 (python/Sphinx-3.5.2.tar.gz) = 672cfcc24b6b69235c97c750cb190a44ecd72696b4452acaf75c2d9cc78ca5ff -SIZE (python/Sphinx-3.5.2.tar.gz) = 5907358 +TIMESTAMP = 1639451734 +SHA256 (python/Sphinx-4.3.1.tar.gz) = 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45 +SIZE (python/Sphinx-4.3.1.tar.gz) = 6655951 diff --git a/textproc/py-sphinx/files/patch-sphinx_util_typing.py b/textproc/py-sphinx/files/patch-sphinx_util_typing.py deleted file mode 100644 index 2b21fdd41d1a..000000000000 --- a/textproc/py-sphinx/files/patch-sphinx_util_typing.py +++ /dev/null @@ -1,58 +0,0 @@ -From 8b2031c747e7c7e6b845ee2e3db47de617d33cc6 Mon Sep 17 00:00:00 2001 -From: Takeshi KOMIYA <i.tkomiya@gmail.com> -Date: Fri, 30 Jul 2021 01:27:38 +0900 -Subject: [PATCH] Fix #9512: sphinx-build: crashed with the HEAD of Python 3.10 - -Recently, `types.Union` was renamed to `types.UnionType` on the HEAD -of 3.10 (refs: python/cpython#27342). After this change, sphinx-build -has been crashed because of ImportError. ---- CHANGES.orig 2021-03-06 11:59:38 UTC -+++ CHANGES -@@ -419,6 +419,8 @@ Bugs fixed - * #6914: figure numbers are unexpectedly assigned to uncaptioned items - * #8320: make "inline" line numbers un-selectable - -+* #9512: sphinx-build: crashed with the HEAD of Python 3.10 -+ - Testing - -------- - - CHANGES | 2 ++ - sphinx/util/typing.py | 12 ++++++------ - 2 files changed, 8 insertions(+), 6 deletions(-) - ---- sphinx/util/typing.py.orig 2021-03-06 11:58:24 UTC -+++ sphinx/util/typing.py -@@ -30,10 +30,10 @@ else: - ref = _ForwardRef(self.arg) - return ref._eval_type(globalns, localns) - --if sys.version_info > (3, 10): -- from types import Union as types_Union --else: -- types_Union = None -+try: -+ from types import UnionType # type: ignore # python 3.10 or above -+except ImportError: -+ UnionType = None - - if False: - # For type annotation -@@ -107,7 +107,7 @@ def restify(cls: Optional["Type"]) -> str: - return ':class:`struct.Struct`' - elif inspect.isNewType(cls): - return ':class:`%s`' % cls.__name__ -- elif types_Union and isinstance(cls, types_Union): -+ elif UnionType and isinstance(cls, UnionType): - if len(cls.__args__) > 1 and None in cls.__args__: - args = ' | '.join(restify(a) for a in cls.__args__ if a) - return 'Optional[%s]' % args -@@ -349,7 +349,7 @@ def _stringify_py37(annotation: Any) -> str: - elif hasattr(annotation, '__origin__'): - # instantiated generic provided by a user - qualname = stringify(annotation.__origin__) -- elif types_Union and isinstance(annotation, types_Union): # types.Union (for py3.10+) -+ elif UnionType and isinstance(annotation, UnionType): # types.Union (for py3.10+) - qualname = 'types.Union' - else: - # we weren't able to extract the base type, appending arguments would