Permalink
Browse files

update docs/conf.py, avoid importing alphatwirl

  • Loading branch information...
TaiSakuma committed Aug 7, 2018
1 parent 9367d39 commit 2c99f6c8e9170f6e4d8221fb58add5b16980d0fd
Showing with 13 additions and 3 deletions.
  1. +13 −3 docs/conf.py
@@ -36,13 +36,23 @@
copyright = u'2018, Tai Sakuma'
author = u'Tai Sakuma'
import alphatwirl
version = '.'.join(alphatwirl.__version__.split('.')[0:2])
##__________________________________________________________________||
# import alphatwirl/_version.py without importing alphatwirl
path = os.path.dirname(os.path.abspath('.'))
path = os.path.join(path, 'alphatwirl')
sys.path.insert(0, path)
del path
from _version import get_versions
sys.path.pop()
version = '.'.join(get_versions()['version'].split('.')[0:2])
# e.g., '0.11'
release = '.'.join(alphatwirl.__version__.split('+')[0:1])
release = '.'.join(get_versions()['version'].split('+')[0:1])
# e.g., '0.11.0.dev'
##__________________________________________________________________||
language = None
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

0 comments on commit 2c99f6c

Please sign in to comment.