docs conf

This commit is contained in:
Gael Pasgrimaud
2011-01-15 20:23:56 +01:00
parent 09eaf4cd38
commit c3192d53e1
+16 -1
View File
@@ -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