server/src/__init__.py
author ymh <ymh.work@gmail.com>
Mon, 08 Jun 2015 00:12:18 +0200
changeset 121 cc05aad7e6b8
parent 118 fea47f1054e2
child 132 ca7e5ca8635c
permissions -rw-r--r--
src are not at repo root folder
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
118
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     1
VERSION = (0, 1, 0, "alpha", 0)
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     2
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     3
VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2])))
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     4
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     5
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     6
def get_version():
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     7
    version = '%s.%s' % (VERSION[0], VERSION[1])
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     8
    if VERSION[2]:
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
     9
        version = '%s.%s' % (version, VERSION[2])
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    10
    if VERSION[3] == 'alpha':
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    11
        version = '%s-alpha.%s' % (version, VERSION[4])
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    12
    else:
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    13
        if VERSION[3] != 'final':
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    14
            version = '%s %s %s' % (version, VERSION[3], VERSION[4])
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    15
    return version
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    16
fea47f1054e2 prepare for server install, mv settings, add setup, correct various problems
ymh <ymh.work@gmail.com>
parents: 117
diff changeset
    17
__version__ = get_version()