diff options
| author | David Cramer | 2011-05-10 00:06:54 -0700 | 
|---|---|---|
| committer | David Cramer | 2011-05-10 00:06:54 -0700 | 
| commit | 3f98e826400f29da672e96c1b08dc4bf7287b5c2 (patch) | |
| tree | b890ea2fcf7fd53983c9f890e5b8a12f87152fa7 | |
| parent | 33a22a2e1200332b7e18a4ab4af6ef00e28d71dc (diff) | |
| download | django-debug-toolbar-3f98e826400f29da672e96c1b08dc4bf7287b5c2.tar.bz2 | |
Bump version and use get-distribution to avoid unnescesary imports
| -rw-r--r-- | debug_toolbar/__init__.py | 9 | ||||
| -rw-r--r-- | setup.py | 2 | 
2 files changed, 8 insertions, 3 deletions
| 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' @@ -2,7 +2,7 @@ from setuptools import setup, find_packages  setup(      name='django-debug-toolbar', -    version=__import__('debug_toolbar').__version__, +    version='0.8.6-dev',      description='A configurable set of panels that display various debug information about the current request/response.',      long_description=open('README.rst').read(),      # Get more strings from http://www.python.org/pypi?:action=list_classifiers | 
