From: Armin Ronacher Date: Sun, 6 Feb 2011 11:28:29 +0000 (+0100) Subject: Use actual release info X-Git-Tag: 2.6~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b3769403402fa97dd91faa433ca075beb4abda3;p=jinja2.git Use actual release info --- 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: