From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 0DD6429CA for ; Fri, 23 Jun 2017 15:05:32 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 23 Jun 2017 06:05:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,378,1493708400"; d="scan'208";a="118471378" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by fmsmga006.fm.intel.com with ESMTP; 23 Jun 2017 06:05:31 -0700 From: John McNamara To: dev@dpdk.org Cc: John McNamara Date: Fri, 23 Jun 2017 14:05:29 +0100 Message-Id: <1498223129-28590-1-git-send-email-john.mcnamara@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH v1] doc: import sphinx rtd doc theme when available X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 13:05:33 -0000 The ReadTheDocs theme is no longer available by default in Sphinx versions >= 1.3.1 and if it isn't available then an exception is raised. This patch imports the ReadTheDocs theme when it is available and warns but proceeds when it isn't. Signed-off-by: John McNamara --- doc/guides/conf.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/guides/conf.py b/doc/guides/conf.py index c3cd0bd..3988075 100644 --- a/doc/guides/conf.py +++ b/doc/guides/conf.py @@ -47,11 +47,17 @@ # Python 3. import configparser +try: + import sphinx_rtd_theme -project = 'Data Plane Development Kit' - -if LooseVersion(sphinx_version) >= LooseVersion('1.3.1'): html_theme = "sphinx_rtd_theme" + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +except: + print('Install the sphinx ReadTheDocs theme for improved html documentation ' + 'layout: pip install sphinx_rtd_theme') + pass + +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 = "" -- 2.7.4