From 3f98e826400f29da672e96c1b08dc4bf7287b5c2 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Tue, 10 May 2011 00:06:54 -0700 Subject: Bump version and use get-distribution to avoid unnescesary imports --- debug_toolbar/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'debug_toolbar') diff --git a/debug_toolbar/__init__.py b/debug_toolbar/__init__.py index 90f9e2f..48da4a6 100644 --- a/debug_toolbar/__init__.py +++ b/debug_toolbar/__init__.py @@ -1,2 +1,7 @@ -VERSION = (0, 8, 5) -__version__ = '.'.join(map(str, VERSION)) +__all__ = ('VERSION',) + +try: + VERSION = __import__('pkg_resources') \ + .get_distribution('django-debug-toolbar').version +except Exception, e: + VERSION = 'unknown' -- cgit v1.2.3