|
9 | 9 | import importlib |
10 | 10 | import os |
11 | 11 | import sys |
12 | | -import time |
13 | | - |
14 | | -import sphinx |
15 | 12 |
|
16 | 13 | # Make our custom extensions available to Sphinx |
17 | 14 | sys.path.append(os.path.abspath('tools/extensions')) |
|
97 | 94 | highlight_language = 'python3' |
98 | 95 |
|
99 | 96 | # Minimum version of sphinx required |
100 | | -needs_sphinx = '7.2.6' |
| 97 | +# Keep this version in sync with ``Doc/requirements.txt``. |
| 98 | +needs_sphinx = '8.1.3' |
101 | 99 |
|
102 | 100 | # Create table of contents entries for domain objects (e.g. functions, classes, |
103 | 101 | # attributes, etc.). Default is True. |
|
376 | 374 |
|
377 | 375 | # This 'Last updated on:' timestamp is inserted at the bottom of every page. |
378 | 376 | html_last_updated_fmt = '%b %d, %Y (%H:%M UTC)' |
379 | | -if sphinx.version_info[:2] >= (8, 1): |
380 | | - html_last_updated_use_utc = True |
381 | | -else: |
382 | | - html_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) |
383 | | - html_last_updated_fmt = time.strftime( |
384 | | - html_last_updated_fmt, time.gmtime(html_time) |
385 | | - ) |
| 377 | +html_last_updated_use_utc = True |
386 | 378 |
|
387 | 379 | # Path to find HTML templates to override theme |
388 | 380 | templates_path = ['tools/templates'] |
|
619 | 611 | } |
620 | 612 | extlinks_detect_hardcoded_links = True |
621 | 613 |
|
622 | | -if sphinx.version_info[:2] < (8, 1): |
623 | | - # Sphinx 8.1 has in-built CVE and CWE roles. |
624 | | - extlinks |= { |
625 | | - "cve": ( |
626 | | - "https://www.cve.org/CVERecord?id=CVE-%s", |
627 | | - "CVE-%s", |
628 | | - ), |
629 | | - "cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"), |
630 | | - } |
631 | | - |
632 | 614 | # Options for c_annotations extension |
633 | 615 | # ----------------------------------- |
634 | 616 |
|
|
0 commit comments