From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 1/2] conf.py: add some backward-compatibility bits
Date: Wed, 29 Mar 2023 13:19:53 +0200 [thread overview]
Message-ID: <20230329111954.2584660-2-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20230329111954.2584660-1-mauro.chehab@linux.intel.com>
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Currently, Sphinx 1.6 fails to build the documentation and produces
an ugly warning.
Add compatibility bits to avoid it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
docs/testplan/conf.py | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/docs/testplan/conf.py b/docs/testplan/conf.py
index cfb866cc7a15..98cd7a51ff18 100644
--- a/docs/testplan/conf.py
+++ b/docs/testplan/conf.py
@@ -1,10 +1,15 @@
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: (GPL-2.0 OR MIT)
-import sys
import os
+import sphinx
+import sys
+
from shutil import which
+# Get Sphinx version
+major, minor, patch = sphinx.version_info[:3]
+
extensions = []
if which('rst2pdf'):
@@ -21,21 +26,33 @@ language = 'en'
exclude_patterns = []
todo_include_todos = False
+if major < 2 and minor < 6:
+ html_use_smartypants = False
+else:
+ smartquotes = False
+
html_theme = "nature"
+# body_max_width causes build error with nature theme on version < 1.7
+if major < 2 and minor < 7:
+ html_theme_options = {
+ "sidebarwidth": "400px",
+ }
+else:
+ html_theme_options = {
+ "body_max_width": "1520px",
+ "sidebarwidth": "400px",
+ }
+
+print("Theme: %s" % html_theme)
+
html_css_files = []
html_static_path = ['.']
html_copy_source = False
-html_use_smartypants = False
html_sidebars = { '**': ['searchbox.html', 'localtoc.html']}
htmlhelp_basename = 'IGT'
-html_theme_options = {
- "body_max_width": "1520px",
- "sidebarwidth": "400px",
-}
-
# rst2pdf
pdf_documents = [
('index', u'xe_tests', u'IGT Xe Tests', u'IGT authors'),
--
2.39.2
next prev parent reply other threads:[~2023-03-29 11:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 11:19 [igt-dev] [PATCH i-g-t 0/2] Add support for prehistoric sphinx versions Mauro Carvalho Chehab
2023-03-29 11:19 ` Mauro Carvalho Chehab [this message]
2023-03-29 11:19 ` [igt-dev] [PATCH i-g-t 2/2] docs/testplan/conf.py: avoid using shutil include Mauro Carvalho Chehab
2023-03-29 12:10 ` [igt-dev] ✓ Fi.CI.BAT: success for Add support for prehistoric sphinx versions Patchwork
2023-03-29 12:26 ` [igt-dev] [PATCH i-g-t 0/2] " Swati Sharma
2023-03-30 1:34 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230329111954.2584660-2-mauro.chehab@linux.intel.com \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox