From c3192d53e19cb8146dd4096b54a07b4190c0b605 Mon Sep 17 00:00:00 2001 From: Gael Pasgrimaud Date: Sat, 15 Jan 2011 20:23:56 +0100 Subject: [PATCH] docs conf --- docs/conf.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 +