[packages/sphinx-pdg] - up to 4.5.0

baggins baggins at pld-linux.org
Tue Mar 29 08:51:05 CEST 2022


commit 79df875b94f1a75cfffcce1328a03185bc1665c8
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Mar 29 08:50:33 2022 +0200

    - up to 4.5.0

 Sphinx-docutils.patch |   4 +-
 Sphinx-jinja3.patch   | 120 --------------------------------------------------
 sphinx-pdg.spec       |  18 ++++----
 3 files changed, 12 insertions(+), 130 deletions(-)
---
diff --git a/sphinx-pdg.spec b/sphinx-pdg.spec
index 34aa8fc..8695c15 100644
--- a/sphinx-pdg.spec
+++ b/sphinx-pdg.spec
@@ -11,15 +11,14 @@
 Summary:	Sphinx - Python documentation generator
 Summary(pl.UTF-8):	Sphinx - narzędzie do tworzenia dokumentacji dla Pythona
 Name:		sphinx-pdg
-Version:	3.5.4
-Release:	3.1
+Version:	4.5.0
+Release:	1
 License:	BSD
 Group:		Development/Languages/Python
 #Source0Download: https://pypi.org/simple/Sphinx/
 Source0:	https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
-# Source0-md5:	dd46088ebc01f6f721ee7618df680d68
+# Source0-md5:	ed63e60d798d212c1afdecf8acda690e
 Patch0:		float-ver.patch
-Patch1:		Sphinx-jinja3.patch
 Patch2:		Sphinx-docutils.patch
 URL:		http://www.sphinx-doc.org/
 %if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
@@ -59,12 +58,16 @@ BuildRequires:	python3-sphinxcontrib-jsmath
 BuildRequires:	python3-sphinxcontrib-htmlhelp
 BuildRequires:	python3-sphinxcontrib-serializinghtml
 BuildRequires:	python3-sphinxcontrib-qthelp
-%if "%{py3_ver}" < "3.8"
-BuildRequires:	python3-typed_ast
-%endif
 %endif
 %if %{with doc}
+BuildRequires:	python3-alabaster >= 0.7
+BuildRequires:	python3-alabaster < 0.8
 BuildRequires:	python3-docutils
+BuildRequires:	python3-imagesize
+BuildRequires:	python3-jinja2 >= 2.3
+BuildRequires:	python3-packaging
+BuildRequires:	python3-pygments
+BuildRequires:	python3-requests >= 2.5.0
 BuildRequires:	python3-sphinxcontrib-applehelp
 BuildRequires:	python3-sphinxcontrib-devhelp
 BuildRequires:	python3-sphinxcontrib-htmlhelp
@@ -138,7 +141,6 @@ Dokumentacja do generatora dokumentacji pythonowej Sphinx.
 %prep
 %setup -q -n Sphinx-%{version}
 %patch0 -p1
-%patch1 -p1
 %patch2 -p1
 
 # needs python-babel with at least de,en,ja locales installed
diff --git a/Sphinx-docutils.patch b/Sphinx-docutils.patch
index 53573cc..ebc1c17 100644
--- a/Sphinx-docutils.patch
+++ b/Sphinx-docutils.patch
@@ -4,8 +4,8 @@
      'sphinxcontrib-qthelp',
      'Jinja2>=2.3',
      'Pygments>=2.0',
--    'docutils>=0.12,<0.17',
-+    'docutils>=0.12,<0.19',
+-    'docutils>=0.14,<0.18',
++    'docutils>=0.14,<0.19',
      'snowballstemmer>=1.1',
      'babel>=1.3',
      'alabaster>=0.7,<0.8',
diff --git a/Sphinx-jinja3.patch b/Sphinx-jinja3.patch
deleted file mode 100644
index d3b8aae..0000000
--- a/Sphinx-jinja3.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 85f58874ecd9feb391e24f9d0197bef5cc637a87 Mon Sep 17 00:00:00 2001
-From: Takeshi KOMIYA <i.tkomiya at gmail.com>
-Date: Mon, 3 May 2021 13:48:17 +0900
-Subject: [PATCH] Support jinja2-3.0
-
-Since jinja2-3.0, some utility functions like contextfunction and
-environmentfilter are renamed to new name.  This follows the updates to
-support jinja2-3.0 or above.
----
- CHANGES              |  2 ++
- setup.py             |  3 +--
- sphinx/jinja2glue.py | 13 +++++++++----
- sphinx/util/rst.py   | 10 ++++++++--
- 4 files changed, 20 insertions(+), 8 deletions(-)
-
-#diff --git a/CHANGES b/CHANGES
-#index ce70aeb83c..c9f0c4556c 100644
-#--- a/CHANGES
-#+++ b/CHANGES
-#@@ -4,6 +4,8 @@ Release 4.1.0 (in development)
-# Dependencies
-# ------------
-# 
-#+* Support jinja2-3.0
-#+
-# Incompatible changes
-# --------------------
-# 
-#diff --git a/setup.py b/setup.py
-#index 7ce37f9eaf..b669afc00e 100644
-#--- a/setup.py
-#+++ b/setup.py
-#@@ -21,8 +21,7 @@
-#     'sphinxcontrib-htmlhelp',
-#     'sphinxcontrib-serializinghtml',
-#     'sphinxcontrib-qthelp',
-#-    'Jinja2>=2.3,<3.0',
-#-    'MarkupSafe<2.0',
-#+    'Jinja2>=2.3',
-#     'Pygments>=2.0',
-#     'docutils>=0.14,<0.18',
-#     'snowballstemmer>=1.1',
-diff --git a/sphinx/jinja2glue.py b/sphinx/jinja2glue.py
-index c239f5a4a1..cd6e8066b9 100644
---- a/sphinx/jinja2glue.py
-+++ b/sphinx/jinja2glue.py
-@@ -12,7 +12,7 @@ from os import path
- from pprint import pformat
- from typing import Any, Callable, Dict, Iterator, List, Tuple, Union
- 
--from jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound, contextfunction
-+from jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound
- from jinja2.environment import Environment
- from jinja2.sandbox import SandboxedEnvironment
- from jinja2.utils import open_if_exists
-@@ -22,6 +22,11 @@ from sphinx.theming import Theme
- from sphinx.util import logging
- from sphinx.util.osutil import mtimes_of_files
- 
-+try:
-+    from jinja2.utils import pass_context  # type: ignore # jinja2-3.0 or above
-+except ImportError:
-+    from jinja2 import contextfunction as pass_context
-+
- if False:
-     # For type annotation
-     from sphinx.builders import Builder
-@@ -102,7 +107,7 @@ class idgen:
-     next = __next__  # Python 2/Jinja compatibility
- 
- 
-- at contextfunction
-+ at pass_context
- def warning(context: Dict, message: str, *args: Any, **kwargs: Any) -> str:
-     if 'pagename' in context:
-         filename = context.get('pagename') + context.get('file_suffix', '')
-@@ -181,9 +186,9 @@ class BuiltinTemplateLoader(TemplateBrid
-         self.environment.filters['toint'] = _toint
-         self.environment.filters['todim'] = _todim
-         self.environment.filters['slice_index'] = _slice_index
--        self.environment.globals['debug'] = contextfunction(pformat)
-+        self.environment.globals['debug'] = pass_context(pformat)
-         self.environment.globals['warning'] = warning
--        self.environment.globals['accesskey'] = contextfunction(accesskey)
-+        self.environment.globals['accesskey'] = pass_context(accesskey)
-         self.environment.globals['idgen'] = idgen
-         if use_i18n:
-             self.environment.install_gettext_translations(builder.app.translator)
-diff --git a/sphinx/util/rst.py b/sphinx/util/rst.py
-index 82b3f6bdaa..8103a8b109 100644
---- a/sphinx/util/rst.py
-+++ b/sphinx/util/rst.py
-@@ -18,11 +18,17 @@
- from docutils.parsers.rst.languages import en as english
- from docutils.statemachine import StringList
- from docutils.utils import Reporter
--from jinja2 import Environment, environmentfilter
-+from jinja2 import Environment
- 
- from sphinx.locale import __
- from sphinx.util import docutils, logging
- 
-+try:
-+    from jinja2.utils import pass_environment  # type: ignore  # jinja2-3.0 or above
-+except ImportError:
-+    from jinja2 import environmentfilter as pass_environment
-+
-+
- logger = logging.getLogger(__name__)
- 
- docinfo_re = re.compile(':\\w+:.*?')
-@@ -51,7 +57,7 @@ def charwidth(char: str, widechars: str) -> int:
-     return sum(charwidth(c, widechars) for c in text)
- 
- 
-- at environmentfilter
-+ at pass_environment
- def heading(env: Environment, text: str, level: int = 1) -> str:
-     """Create a heading for *level*."""
-     assert level <= 3
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sphinx-pdg.git/commitdiff/79df875b94f1a75cfffcce1328a03185bc1665c8



More information about the pld-cvs-commit mailing list