From c55eeebd45cfba6a0411128852b1b1be0345a4fa Mon Sep 17 00:00:00 2001 From: Stanislav Zubov Date: Mon, 7 Oct 2019 18:04:50 +0700 Subject: [PATCH] python3.6: ImportError workaround, allows to see help --- sphinxcontrib/versioning/sphinx_.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sphinxcontrib/versioning/sphinx_.py b/sphinxcontrib/versioning/sphinx_.py index a90587d4f..711138d8d 100644 --- a/sphinxcontrib/versioning/sphinx_.py +++ b/sphinxcontrib/versioning/sphinx_.py @@ -6,7 +6,14 @@ import os import sys -from sphinx import application, build_main, locale +from sphinx import application, locale + +try: + from sphinx import build_main +except ImportError: + # Python 3.6+ ImportError fix + from sphinx.cmd.build import build_main + from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.config import Config as SphinxConfig from sphinx.errors import SphinxError