From 4b3769403402fa97dd91faa433ca075beb4abda3 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 6 Feb 2011 12:28:29 +0100 Subject: [PATCH] Use actual release info --- docs/conf.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0a5157d..6e990be 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -42,9 +42,18 @@ copyright = '2008, Armin Ronacher' # other places throughout the built documents. # # The short X.Y version. -version = '2.0' -# The full version, including alpha/beta/rc tags. -release = '2.0' +import pkg_resources +try: + release = pkg_resources.get_distribution('Jinja2').version +except ImportError: + print 'To build the documentation, The distribution information of Jinja2' + print 'Has to be available. Either install the package into your' + print 'development environment or run "setup.py develop" to setup the' + print 'metadata. A virtualenv is recommended!' + sys.exit(1) +if 'dev' in release: + release = release.split('dev')[0] + 'dev' +version = '.'.join(release.split('.')[:2]) # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -- 2.26.2