Commits

Mike Bayer committed 83c7417

- added "mako.__version__" attribute to
the base module. [ticket:110]

Comments (0)

Files changed (4)

   was causing tags to compile with 
   case-insensitive names, thus messing up
   custom <%call> names. [ticket:108]
+
+- added "mako.__version__" attribute to
+  the base module.  [ticket:110]
   
 0.2.4
 - Fixed compatibility with Jython 2.5b1.

doc/build/genhtml.py

 sys.path = ['../../lib', './lib/'] + sys.path
 
 from mako.lookup import TemplateLookup
-from mako import exceptions
+from mako import exceptions, __version__ as version
 
 import read_markdown, toc
 
     ]
 
 title='Mako Documentation'
-version = '0.2.3'
 
 root = toc.TOCElement('', 'root', '', version=version, doctitle=title)
 

lib/mako/__init__.py

 # This module is part of Mako and is released under
 # the MIT License: http://www.opensource.org/licenses/mit-license.php
 
+
+__version__ = '0.2.5'
+
 from setuptools import setup, find_packages
+import os
+import re
 
-version = '0.2.5'
+v = file(os.path.join(os.path.dirname(__file__), 'lib', 'mako', '__init__.py'))
+VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
+v.close()
 
 setup(name='Mako',
-      version=version,
+      version=VERSION,
       description="A super-fast templating language that borrows the \
  best ideas from the existing templating languages.",
       long_description="""\