From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165085AbeCBLtH (ORCPT ); Fri, 2 Mar 2018 06:49:07 -0500 Received: from mx2.suse.de ([195.135.220.15]:43454 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163227AbeCBLtF (ORCPT ); Fri, 2 Mar 2018 06:49:05 -0500 Date: Fri, 02 Mar 2018 12:49:03 +0100 Message-ID: From: Takashi Iwai To: Jonathan Corbet Cc: Jani Nikula , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Documentation/sphinx: Fix Directive import error User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sphinx.util.compat Directive stuff was deprecated in the recent Sphinx version, and now we get a build error. Let's take a fallback to the newer one, from docutils.parsers.rst. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1083694 Signed-off-by: Takashi Iwai --- I'm no expert of sphinx nor python, so something might be wrong. Please check it. --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -37,7 +37,10 @@ import glob from docutils import nodes, statemachine from docutils.statemachine import ViewList from docutils.parsers.rst import directives -from sphinx.util.compat import Directive +try: + from sphinx.util.compat import Directive +except ImportError: + from docutils.parsers.rst import directives, Directive from sphinx.ext.autodoc import AutodocReporter __version__ = '1.0'