From f75f4094f3e6b553f4f1d3cec209a32d187acc58 Mon Sep 17 00:00:00 2001 From: Kai Chen Date: Fri, 12 Oct 2018 13:58:01 +0800 Subject: [PATCH] fix doc building error --- docs/conf.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 95602c40e..679330055 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,11 +12,10 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -import os -import sys -sys.path.insert(0, os.path.abspath('..')) - -import mmcv # noqa: E402 +version_file = '../mmcv/version.py' +with open(version_file, 'r') as f: + exec(compile(f.read(), version_file, 'exec')) +__version__ = locals()['__version__'] # -- Project information ----------------------------------------------------- @@ -25,9 +24,9 @@ copyright = '2018, Kai Chen' author = 'Kai Chen' # The short X.Y version -version = mmcv.__version__ +version = __version__ # The full version, including alpha/beta/rc tags -release = mmcv.__version__ +release = __version__ # -- General configuration ---------------------------------------------------