Revision 450e0a22 snf-app/synnefo/__init__.py

b/snf-app/synnefo/__init__.py
1
VERSION = (0, 8, 0, 'alpha', 0)
2
__version__ = VERSION
3

  
4
def get_version():
5
    version = '%s.%s' % (VERSION[0], VERSION[1])
6
    if VERSION[2]:
7
        version = '%s.%s' % (version, VERSION[2])
8
    if VERSION[3:] == ('alpha', 0):
9
        version = '%s pre-alpha' % version
10
    else:
11
        if VERSION[3] != 'final':
12
            version = '%s %s %s' % (version, VERSION[3], VERSION[4])
13
    return version
1
# this is a namespace package
2
try:
3
    import pkg_resources
4
    pkg_resources.declare_namespace(__name__)
5
except ImportError:
6
    import pkgutil
7
    __path__ = pkgutil.extend_path(__path__, __name__)

Also available in: Unified diff