kombu.VERSION is now a namedtuple

This commit is contained in:
Ask Solem 2013-11-20 18:08:53 +00:00
parent f38cec6034
commit b8fda33a0f
2 changed files with 9 additions and 3 deletions

View File

@ -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 File

@ -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("\"'")