Skip to content

Commit 2139cbd

Browse files
authored
Merge pull request #1131 from gusthoff/topic/infrastructure/sphinx/updates/20241026
Python: upgrading to Sphinx 8.x
2 parents e650b3a + 9ec2ddb commit 2139cbd

File tree

7 files changed

+42
-38
lines changed

7 files changed

+42
-38
lines changed

.github/workflows/sphinx-books-tests.js.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
texlive-fonts-extra \
4646
latexmk \
4747
texlive-xetex \
48+
xindy \
4849
fonts-lmodern \
4950
fonts-open-sans \
5051
fonts-dejavu \

Vagrantfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ $epub = <<-SHELL
113113
texlive-fonts-extra \
114114
latexmk \
115115
texlive-xetex \
116+
xindy \
116117
fonts-lmodern \
117118
fonts-open-sans \
118119
fonts-dejavu \

frontend/requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
coverage==7.6.0
2-
docutils==0.20.1
1+
coverage==7.6.4
2+
docutils==0.21.2
33
graphviz==0.20.3
4-
ipython==8.26.0
4+
ipython==8.29.0
55
pdf2image==1.17.0
6-
pillow==10.4.0
6+
pillow==11.0.0
77
pydot-ng==2.0.0
88
Pygments==2.18.0
9-
pyparsing==3.1.2
10-
Sphinx==7.4.7
9+
pyparsing==3.2.0
10+
Sphinx==8.1.3
1111
sphinx-reredirects==0.1.5
12-
sphinx-rtd-theme==2.0.0
12+
sphinx-rtd-theme==3.0.1
1313
sphinxcontrib-plantuml==0.30
1414
websocket-client==1.8.0

frontend/requirements_frozen.txt

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
alabaster==0.7.16
1+
alabaster==1.0.0
22
asttokens==2.4.1
3-
Babel==2.15.0
4-
certifi==2024.7.4
5-
charset-normalizer==3.3.2
6-
coverage==7.6.0
3+
babel==2.16.0
4+
certifi==2024.8.30
5+
charset-normalizer==3.4.0
6+
coverage==7.6.4
77
decorator==5.1.1
8-
docutils==0.20.1
9-
executing==2.0.1
8+
docutils==0.21.2
9+
executing==2.1.0
1010
graphviz==0.20.3
11-
idna==3.7
11+
idna==3.10
1212
imagesize==1.4.1
13-
ipython==8.26.0
13+
ipython==8.29.0
1414
jedi==0.19.1
1515
Jinja2==3.1.4
16-
MarkupSafe==2.1.5
16+
MarkupSafe==3.0.2
1717
matplotlib-inline==0.1.7
1818
packaging==24.1
1919
parso==0.8.4
2020
pdf2image==1.17.0
2121
pexpect==4.9.0
22-
pillow==10.4.0
23-
prompt_toolkit==3.0.47
22+
pillow==11.0.0
23+
prompt_toolkit==3.0.48
2424
ptyprocess==0.7.0
2525
pure-eval==0.2.3
2626
pydot-ng==2.0.0
2727
Pygments==2.18.0
28-
pyparsing==3.1.2
28+
pyparsing==3.2.0
2929
requests==2.32.3
3030
six==1.16.0
3131
snowballstemmer==2.2.0
32-
Sphinx==7.4.7
32+
Sphinx==8.1.3
3333
sphinx-reredirects==0.1.5
34-
sphinx-rtd-theme==2.0.0
35-
sphinxcontrib-applehelp==1.0.8
36-
sphinxcontrib-devhelp==1.0.6
37-
sphinxcontrib-htmlhelp==2.0.6
34+
sphinx-rtd-theme==3.0.1
35+
sphinxcontrib-applehelp==2.0.0
36+
sphinxcontrib-devhelp==2.0.0
37+
sphinxcontrib-htmlhelp==2.1.0
3838
sphinxcontrib-jquery==4.1
3939
sphinxcontrib-jsmath==1.0.1
4040
sphinxcontrib-plantuml==0.30
41-
sphinxcontrib-qthelp==1.0.8
42-
sphinxcontrib-serializinghtml==1.1.10
41+
sphinxcontrib-qthelp==2.0.0
42+
sphinxcontrib-serializinghtml==2.0.0
4343
stack-data==0.6.3
4444
traitlets==5.14.3
4545
typing_extensions==4.12.2
46-
urllib3==2.2.2
46+
urllib3==2.2.3
4747
wcwidth==0.2.13
4848
websocket-client==1.8.0

frontend/sphinx/conf.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ def get_file_from_conf_ini(path_to_file):
221221
'[GNATcheck Reference Manual: %s]'),
222222
'gnat_stack_ug_url': ('http://docs.adacore.com/live/wave/gnatstack/html/gnatstack_ug/%s',
223223
'[GNATstack User\'s Guide: %s]'),
224-
'cwe': ('https://cwe.mitre.org/data/definitions/%s.html',
225-
'[CWE-%s]'),
226224
}
227225

228226
extlinks_detect_hardcoded_links = True
@@ -252,9 +250,8 @@ def get_file_from_conf_ini(path_to_file):
252250
#
253251
html_theme_options = {
254252
'logo_only': True,
255-
# 'analytics_id': '',
256-
# 'analytics_anonymize_ip': False,
257-
'display_version': False,
253+
'flyout_display': 'hidden',
254+
'version_selector': False,
258255
'prev_next_buttons_location': 'bottom',
259256
'style_external_links': False,
260257
'vcs_pageview_mode': '',
@@ -487,8 +484,10 @@ def get_file_from_conf_ini(path_to_file):
487484

488485
def setup(app):
489486

487+
outdir = str(app.outdir)
488+
490489
# TODO: find a better way to retrieve the current target (html/latex/epub)
491-
if 'html' in app.outdir:
490+
if 'html' in outdir:
492491
templates_path.append('_templates')
493492

494493
redirects.update({
@@ -517,10 +516,10 @@ def setup(app):
517516

518517
if not os.getenv('SPHINX_LOCAL_BUILD'):
519518
raise e
520-
elif 'epub' in app.outdir:
519+
elif 'epub' in outdir:
521520
if config.has_option('', 'cover_page'):
522521
pdf_cover_page = get_file_from_conf_ini(config['DEFAULT']['cover_page'])
523-
png_cover_page = app.outdir + "/" + '_static/cover.jpeg'
522+
png_cover_page = outdir + "/" + '_static/cover.jpeg'
524523

525524
pages = convert_from_path(pdf_path=pdf_cover_page,
526525
dpi=72,

frontend/sphinx/widget_extension.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ def run(self) -> List[Node]:
260260
widget.parseContent(self.content)
261261

262262
# Attemping to detect HTML or Latex output by checking for 'html' in tags
263-
if ('builder_html' in self.state.state_machine.document.settings.env.app.tags.tags
264-
and self.state.state_machine.document.settings.env.app.tags.tags['builder_html']):
263+
if (self.state.state_machine.document.settings.env.app.tags.eval_condition('builder_html')):
265264

266265
jinja_env = Environment(
267266
loader=PackageLoader('widget'),

frontend/vm_apt_epub.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ byobu=5.133-1.1ubuntu1
3434
bzip2=1.0.8-5build1
3535
ca-certificates=20230311ubuntu1
3636
ca-certificates-java=20230710
37+
clisp=1:2.49.20210628.gitde01f0f-3.1
3738
cloud-guest-utils=0.33-1
3839
cloud-init=24.1.3-0ubuntu1~23.10.6
3940
cloud-initramfs-copymods=0.47ubuntu1
@@ -353,6 +354,7 @@ libext2fs2:amd64=1.47.0-2ubuntu1
353354
libfakeroot:amd64=1.32.1-1
354355
libfastjson4:amd64=1.2304.0-1
355356
libfdisk1:amd64=2.39.1-4ubuntu2.2
357+
libffcall1b:amd64=2.4-2
356358
libffi8:amd64=3.4.4-1
357359
libfido2-1:amd64=1.13.0-1
358360
libfile-basedir-perl=0.09-2
@@ -1020,6 +1022,8 @@ xdg-utils=1.1.3-4.1ubuntu3
10201022
xfonts-encodings=1:1.0.5-0ubuntu2
10211023
xfonts-utils=1:7.7+6build2
10221024
xfsprogs=6.3.0-1ubuntu1
1025+
xindy=2.5.1.20160104-11build1
1026+
xindy-rules=2.5.1.20160104-11build1
10231027
xkb-data=2.38-2
10241028
xml-core=0.18+nmu1
10251029
xorg-sgml-doctools=1:1.11-1.1

0 commit comments

Comments
 (0)