doc: fix build with Sphinx 4
authorThomas Monjalon <thomas@monjalon.net>
Mon, 10 May 2021 20:45:37 +0000 (22:45 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 11 May 2021 21:01:06 +0000 (23:01 +0200)
Sphinx 4.0 became stricter with permalink configuration:
"
html_add_permalinks has been deprecated since v3.5.0.
Please use html_permalinks and html_permalinks_icon instead.
"

The new variable is used while keeping compatibility
with older Sphinx versions.

Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
doc/guides/conf.py

index ec59aea..c22caaa 100644 (file)
@@ -31,7 +31,10 @@ stop_on_error = ('-W' in argv)
 project = 'Data Plane Development Kit'
 html_logo = '../logo/DPDK_logo_vertical_rev_small.png'
 latex_logo = '../logo/DPDK_logo_horizontal_tag.png'
-html_add_permalinks = ""
+if LooseVersion(sphinx_version) >= LooseVersion('3.5'):
+    html_permalinks = False
+else:
+    html_add_permalinks = ""
 html_show_copyright = False
 highlight_language = 'none'