diff --git a/kombu/__init__.py b/kombu/__init__.py index 8f5dd56d..8e90c872 100644 --- a/kombu/__init__.py +++ b/kombu/__init__.py @@ -1,8 +1,14 @@ """Messaging library for Python""" from __future__ import absolute_import -VERSION = (3, 0, 5) -__version__ = '.'.join(map(str, VERSION[0:3])) + ''.join(VERSION[3:]) +from collections import namedtuple + +version_info_t = namedtuple( + 'version_info_t', ('major', 'minor', 'micro', 'releaselevel', 'serial'), +) + +VERSION = version_info_t(3, 0, 5, '', '') +__version__ = '{0.major}.{0.minor}.{0.micro}{0.releaselevel}'.format(VERSION) __author__ = 'Ask Solem' __contact__ = 'ask@celeryproject.org' __homepage__ = 'http://kombu.readthedocs.org' diff --git a/setup.py b/setup.py index 52894b0a..7ee3fc2f 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ from distutils.command.install import INSTALL_SCHEMES # -- Parse meta import re re_meta = re.compile(r'__(\w+?)__\s*=\s*(.*)') -re_vers = re.compile(r'VERSION\s*=\s*\((.*?)\)') +re_vers = re.compile(r'VERSION\s*=.*?\((.*?)\)') re_doc = re.compile(r'^"""(.+?)"""') rq = lambda s: s.strip("\"'")