diff --git a/docs/conf.py b/docs/conf.py index b50ef57..de76ee9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,7 +50,7 @@ copyright = u'2011, Gael Pasgrimaud' # The short X.Y version. version = '0.1' # The full version, including alpha/beta/rc tags. -release = '0.1' +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -218,3 +218,18 @@ man_pages = [ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/': None} + +html_theme = 'nature' +from os import path +pkg_dir = path.abspath(__file__).split('/docs')[0] +setup = path.join(pkg_dir, 'setup.py') +if path.isfile(setup): + for line_ in open(setup): + if line_.startswith("version"): + version = line_.split('=')[-1] + version = version.strip() + version = version.strip("'\"") + release = version + break +del pkg_dir, setup, path +