src/hp/__init__.py
author ymh <ymh.work@gmail.com>
Mon, 26 Nov 2012 17:34:22 +0100
changeset 86 37e079fca50f
parent 80 0fcb603b04eb
child 91 eb2aa2a469e2
permissions -rw-r--r--
new version with search and improvement on scrolling description
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
86
37e079fca50f new version with search and improvement on scrolling description
ymh <ymh.work@gmail.com>
parents: 80
diff changeset
     1
VERSION = (0, 8, 0, "alpha", 0)
38
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
     2
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
     3
VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2])))
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
     4
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
     5
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
     6
def get_version():
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
     7
    version = '%s.%s' % (VERSION[0], VERSION[1])
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
     8
    if VERSION[2]:
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
     9
        version = '%s.%s' % (version, VERSION[2])
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
    10
    if VERSION[3:] == ('alpha', 0):
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
    11
        version = '%s pre-alpha' % version
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
    12
    else:
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
    13
        if VERSION[3] != 'final':
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
    14
            version = '%s %s %s' % (version, VERSION[3], VERSION[4])
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
    15
    return version
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
    16
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
    17
__version__ = get_version()