#NEWLINE# def tag_to_version( tag ) : #NEWLINE# #INDENT# trace ( 'tag' , tag ) #NEWLINE# version = tag . rsplit ( '-' , 1 ) [ ( - 1 ) ] . lstrip ( 'v' ) #NEWLINE# if ( parse_version is None ) : #NEWLINE# #INDENT# return version #NEWLINE# #UNINDENT# version = parse_version ( version ) #NEWLINE# trace ( 'version' , repr ( version ) ) #NEWLINE# if isinstance ( version , SetuptoolsVersion ) : #NEWLINE# #INDENT# return version