Version back to 4.0.0-alpha3; handle version number in const.py
svn: r20991
This commit is contained in:
parent
bb9601a2a0
commit
5b8d5b739a
@ -54,7 +54,16 @@ PROGRAM_NAME = "Gramps"
|
|||||||
VERSION = "@VERSIONSTRING@"
|
VERSION = "@VERSIONSTRING@"
|
||||||
if VERSION == "@" + "VERSIONSTRING" + "@":
|
if VERSION == "@" + "VERSIONSTRING" + "@":
|
||||||
raise Exception("Please run 'python setup.py build'")
|
raise Exception("Please run 'python setup.py build'")
|
||||||
VERSION_TUPLE = tuple(map(int, VERSION.split(".")))
|
def get_version_tuple(v):
|
||||||
|
""" Get the numeric-dotted part of version number"""
|
||||||
|
retval = ""
|
||||||
|
for c in v:
|
||||||
|
if c.isdigit() or (c == "." and retval.count(".") <= 1):
|
||||||
|
retval += c
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
return tuple(map(int, retval.split(".")))
|
||||||
|
VERSION_TUPLE = get_version_tuple(VERSION)
|
||||||
major_version = "%s.%s" % (VERSION_TUPLE[0], VERSION_TUPLE[1])
|
major_version = "%s.%s" % (VERSION_TUPLE[0], VERSION_TUPLE[1])
|
||||||
VERSION += get_svn_revision()
|
VERSION += get_svn_revision()
|
||||||
|
|
||||||
|
2
setup.py
2
setup.py
@ -47,7 +47,7 @@ if sys.version_info[0] < 3:
|
|||||||
import commands
|
import commands
|
||||||
from stat import ST_MODE
|
from stat import ST_MODE
|
||||||
|
|
||||||
VERSION = '4.0.0'
|
VERSION = '4.0.0-alpha3'
|
||||||
ALL_LINGUAS = ('bg', 'ca', 'cs', 'da', 'de', 'el', 'en_GB', 'es', 'fi', 'fr', 'he',
|
ALL_LINGUAS = ('bg', 'ca', 'cs', 'da', 'de', 'el', 'en_GB', 'es', 'fi', 'fr', 'he',
|
||||||
'hr', 'hu', 'it', 'ja', 'lt', 'nb', 'nl', 'nn', 'pl', 'pt_BR',
|
'hr', 'hu', 'it', 'ja', 'lt', 'nb', 'nl', 'nn', 'pl', 'pt_BR',
|
||||||
'pt_PT', 'ru', 'sk', 'sl', 'sq', 'sv', 'uk', 'vi', 'zh_CN')
|
'pt_PT', 'ru', 'sk', 'sl', 'sq', 'sv', 'uk', 'vi', 'zh_CN')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user