Esempio n. 1
0
def makeversion(version):

    if version.find("git") >= 0:
        ix = version.find("git")
        version = version[:ix]
    elif version.find("rc") >= 0:
        ix = version.find("rc")
        version = version[:ix]

    s = version.split(".")

    if len(s) >= 4:
        major, minor, micro, milli = [int(i) for i in s[:4]]
    else:
        major, minor, micro = [int(i) for i in s[:3]]
        milli = 0

    return (major << 24) + (minor << 16) + (micro << 8) + milli
Esempio n. 2
0
def makeversion(version):

    if version.find("git") >= 0:
        ix = version.find("git")
        version = version[:ix]
    elif version.find("rc") >= 0:
        ix = version.find("rc")
        version = version[:ix]

    s = version.split(".")

    if len(s) >= 4:
        major, minor, micro, milli = [int(i) for i in s[:4]]
    else:
        major, minor, micro = [int(i) for i in s[:3]]
        milli = 0

    return (major << 24) + (minor << 16) + (micro << 8) + milli
Esempio n. 3
0
def makeversion(version):

    if version.find("dev") >= 0:
        # Example: 2.0.1.dev1

        ix = version.find("dev") - 1
        version = version[:ix]
    elif version.find("rc") >= 0:
        # Example: 2.0.1.rc1

        ix = version.find("rc") - 1
        version = version[:ix]

    s = version.split(".")

    if len(s) >= 4:
        major, minor, micro, milli = [int(i) for i in s[:4]]
    else:
        major, minor, micro = [int(i) for i in s[:3]]
        milli = 0

    return (major << 24) + (minor << 16) + (micro << 8) + milli
Esempio n. 4
0
def makeversion(version):
	build = 255
	if version.find("pre") >= 0:
		ix = version.find("pre")
		build = int(version[ix+3:])
		version = version[:ix]
	elif version.find("svn") >= 0:
		ix = version.find("svn")
		#build = int(version[ix+3:])
		version = version[:ix]
	elif version.find("rc") >= 0:
		ix = version.find("rc")
		build = int(version[ix+2:]) + 0x80
		version = version[:ix]
	s = version.split(".")
	if len(s) >= 4:
		major, minor, micro, milli = [int(i) for i in s[:4]]
	else:
		major, minor, micro = [int(i) for i in s[:3]]
		milli = 0
	return (major << 24) + (minor << 16) + (micro << 8) + milli + build