Modified the way documentation version is retrieved, so that readthedocs.org can get it.

This commit is contained in:
Benoit Bryon 2012-08-29 10:19:51 +02:00
parent 36e862d1c0
commit d69b84a705

View file

@ -13,7 +13,11 @@
import sys, os
import django_downloadview
doc_dir = os.path.dirname(os.path.abspath(__file__))
project_dir = os.path.dirname(doc_dir)
version_filename = os.path.join(project_dir, 'VERSION')
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@ -51,9 +55,9 @@ copyright = u'2012, Benoît Bryon'
# built documents.
#
# The short X.Y version.
version = django_downloadview.__version__
version = open(version_filename).read().strip()
# The full version, including alpha/beta/rc tags.
release = django_downloadview.__version__
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.