From 10d34aa3dee8daf0a07ae152de8377942f63503b Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Wed, 8 Apr 2020 10:09:23 +0200 Subject: [PATCH] doc: fix sphinx compatibility The function add_stylesheet() is deprecated since sphinx 1.8. It will be removed in sphinx 4.0. It is replaced by add_css_file(). Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- doc/guides/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/guides/conf.py b/doc/guides/conf.py index c368fa51d4..08dcfcff54 100644 --- a/doc/guides/conf.py +++ b/doc/guides/conf.py @@ -415,4 +415,8 @@ def setup(app): # Process the numref references once the doctree has been created. app.connect('doctree-resolved', process_numref) - app.add_stylesheet('css/custom.css') + try: + # New function in sphinx 1.8 + app.add_css_file('css/custom.css') + except: + app.add_stylesheet('css/custom.css') -- 2.20.1