Fix Sphinx errors
Jochen Sprickerhof
3 years ago
0 | cyrus-sasl2 (2.1.27+dfsg-2.1) unstable; urgency=medium | |
1 | ||
2 | * Non-maintainer upload. | |
3 | * Fix Sphinx errors (Closes: #955095) | |
4 | ||
5 | -- Jochen Sprickerhof <jspricke@debian.org> Sun, 07 Feb 2021 10:43:14 +0100 | |
6 | ||
0 | 7 | cyrus-sasl2 (2.1.27+dfsg-2) unstable; urgency=medium |
1 | 8 | |
2 | 9 | [ Salvatore Bonaccorso ] |
0 | From: Andreas Hasenack <andreas@canonical.com> | |
1 | Date: Sun, 7 Feb 2021 10:32:30 +0100 | |
2 | Subject: Fix sphinx error | |
3 | ||
4 | --- | |
5 | docsrc/exts/sphinxlocal/builders/manpage.py | 1 - | |
6 | docsrc/exts/sphinxlocal/roles/saslman.py | 1 - | |
7 | docsrc/exts/sphinxlocal/writers/manpage.py | 9 +++------ | |
8 | 3 files changed, 3 insertions(+), 8 deletions(-) | |
9 | ||
10 | diff --git a/docsrc/exts/sphinxlocal/builders/manpage.py b/docsrc/exts/sphinxlocal/builders/manpage.py | |
11 | index a6281f7..126839e 100644 | |
12 | --- a/docsrc/exts/sphinxlocal/builders/manpage.py | |
13 | +++ b/docsrc/exts/sphinxlocal/builders/manpage.py | |
14 | @@ -21,7 +21,6 @@ from docutils.frontend import OptionParser | |
15 | from sphinx import addnodes | |
16 | from sphinx.errors import SphinxError | |
17 | from sphinx.builders import Builder | |
18 | -from sphinx.environment import NoUri | |
19 | from sphinx.util.nodes import inline_all_toctrees | |
20 | from sphinx.util.console import bold, darkgreen | |
21 | from sphinx.writers.manpage import ManualPageWriter | |
22 | diff --git a/docsrc/exts/sphinxlocal/roles/saslman.py b/docsrc/exts/sphinxlocal/roles/saslman.py | |
23 | index f881d98..bcafeec 100644 | |
24 | --- a/docsrc/exts/sphinxlocal/roles/saslman.py | |
25 | +++ b/docsrc/exts/sphinxlocal/roles/saslman.py | |
26 | @@ -18,7 +18,6 @@ from string import Template | |
27 | import re | |
28 | ||
29 | def setup(app): | |
30 | - app.info('Initializing saslman plugin') | |
31 | app.add_crossref_type('saslman', 'saslman', '%s', nodes.generated) | |
32 | return | |
33 | ||
34 | diff --git a/docsrc/exts/sphinxlocal/writers/manpage.py b/docsrc/exts/sphinxlocal/writers/manpage.py | |
35 | index 13864e0..e8e9c3a 100644 | |
36 | --- a/docsrc/exts/sphinxlocal/writers/manpage.py | |
37 | +++ b/docsrc/exts/sphinxlocal/writers/manpage.py | |
38 | @@ -13,8 +13,9 @@ | |
39 | """ | |
40 | ||
41 | from docutils import nodes | |
42 | +from time import strftime | |
43 | + | |
44 | from sphinx.writers.manpage import ( | |
45 | - MACRO_DEF, | |
46 | ManualPageWriter, | |
47 | ManualPageTranslator as BaseTranslator | |
48 | ) | |
49 | @@ -22,7 +23,6 @@ from sphinx.writers.manpage import ( | |
50 | ||
51 | from sphinx import addnodes | |
52 | from sphinx.locale import admonitionlabels, _ | |
53 | -from sphinx.util.osutil import ustrftime | |
54 | ||
55 | class CyrusManualPageWriter(ManualPageWriter): | |
56 | ||
57 | @@ -67,15 +67,12 @@ class CyrusManualPageTranslator(BaseTranslator): | |
58 | if builder.config.today: | |
59 | self._docinfo['date'] = builder.config.today | |
60 | else: | |
61 | - self._docinfo['date'] = ustrftime(builder.config.today_fmt | |
62 | + self._docinfo['date'] = strftime(builder.config.today_fmt | |
63 | or _('%B %d, %Y')) | |
64 | self._docinfo['copyright'] = builder.config.copyright | |
65 | self._docinfo['version'] = builder.config.version | |
66 | self._docinfo['manual_group'] = builder.config.project | |
67 | ||
68 | - # since self.append_header() is never called, need to do this here | |
69 | - self.body.append(MACRO_DEF) | |
70 | - | |
71 | # overwritten -- don't wrap literal_block with font calls | |
72 | self.defs['literal_block'] = ('.sp\n.nf\n', '\n.fi\n') | |
73 |
0 | From: Jochen Sprickerhof <jspricke@debian.org> | |
1 | Date: Sun, 7 Feb 2021 10:33:45 +0100 | |
2 | Subject: Fix more sphinx errors | |
3 | ||
4 | --- | |
5 | docsrc/conf.py | 2 +- | |
6 | docsrc/exts/sphinxlocal/builders/manpage.py | 5 ----- | |
7 | 2 files changed, 1 insertion(+), 6 deletions(-) | |
8 | ||
9 | diff --git a/docsrc/conf.py b/docsrc/conf.py | |
10 | index ba1833c..b22ac3b 100644 | |
11 | --- a/docsrc/conf.py | |
12 | +++ b/docsrc/conf.py | |
13 | @@ -294,7 +294,7 @@ for tuple in pathset: | |
14 | except OSError as e: | |
15 | continue | |
16 | for rstfile in glob.glob("*.rst"): | |
17 | - author = [("The Cyrus Team")] | |
18 | + author = "The Cyrus Team" | |
19 | orphan = 'False'; | |
20 | with io.open(rstfile,'r',encoding="utf8") as f: | |
21 | for line in f: | |
22 | diff --git a/docsrc/exts/sphinxlocal/builders/manpage.py b/docsrc/exts/sphinxlocal/builders/manpage.py | |
23 | index 126839e..c558f73 100644 | |
24 | --- a/docsrc/exts/sphinxlocal/builders/manpage.py | |
25 | +++ b/docsrc/exts/sphinxlocal/builders/manpage.py | |
26 | @@ -55,8 +55,6 @@ class CyrusManualPageBuilder(ManualPageBuilder): | |
27 | components=(docwriter,), | |
28 | read_config_files=True).get_default_values() | |
29 | ||
30 | - self.info(bold('writing... '), nonl=True) | |
31 | - | |
32 | for info in self.config.man_pages: | |
33 | docname, name, description, authors, section = info | |
34 | if isinstance(authors, string_types): | |
35 | @@ -66,7 +64,6 @@ class CyrusManualPageBuilder(ManualPageBuilder): | |
36 | authors = [] | |
37 | ||
38 | targetname = '%s.%s' % (name, section) | |
39 | - self.info(darkgreen(targetname) + ' { ', nonl=True) | |
40 | destination = FileOutput( | |
41 | destination_path=path.join(self.outdir, targetname), | |
42 | encoding='utf-8') | |
43 | @@ -75,7 +72,6 @@ class CyrusManualPageBuilder(ManualPageBuilder): | |
44 | docnames = set() | |
45 | largetree = inline_all_toctrees(self, docnames, docname, tree, | |
46 | darkgreen, [docname]) | |
47 | - self.info('} ', nonl=True) | |
48 | self.env.resolve_references(largetree, docname, self) | |
49 | # remove pending_xref nodes | |
50 | for pendingnode in largetree.traverse(addnodes.pending_xref): | |
51 | @@ -88,7 +84,6 @@ class CyrusManualPageBuilder(ManualPageBuilder): | |
52 | largetree.settings.section = section | |
53 | ||
54 | docwriter.write(largetree, destination) | |
55 | - self.info() | |
56 | ||
57 | def setup(app): | |
58 | app.add_builder(CyrusManualPageBuilder) |