Permalink
Browse files

kombu.VERSION is now a namedtuple

  • Loading branch information...
1 parent f38cec6 commit b8fda33a0f9751253e5dc28c768a6846769fcd08 @ask ask committed Nov 20, 2013
Showing with 9 additions and 3 deletions.
  1. +8 −2 kombu/__init__.py
  2. +1 −1 setup.py
View
@@ -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'
View
@@ -20,7 +20,7 @@
# -- 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("\"'")

0 comments on commit b8fda33

Please sign in to comment.