#NEWLINE# def get_version( ) : #NEWLINE# #INDENT# 'Provide version number\n\n    Use verlib format [1]_:\n      N.N[.N]+[{a|b|c|rc}N[.N]+][.postN][.devN]\n\n    .. [1] http://www.python.org/dev/peps/pep-0386/\n    ' #NEWLINE# main_version = ( '%s.%s.%s' % VERSION [ 0 : 3 ] ) #NEWLINE# if ( len ( VERSION ) < 4 ) : #NEWLINE# #INDENT# return main_version #NEWLINE# #UNINDENT# version_type = VERSION [ 3 ] #NEWLINE# if ( ( not version_type ) or ( version_type == 'final' ) ) : #NEWLINE# #INDENT# return main_version #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( version_type == 'dev' ) : #NEWLINE# #INDENT# return ( '%s.dev' % main_version ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( '%s%s' % ( main_version , version_type ) )