#NEWLINE# def __init__( self , version ) : #NEWLINE# #INDENT# match = self . _regex . search ( version ) #NEWLINE# if ( not match ) : #NEWLINE# #INDENT# raise InvalidVersion ( "Invalid version: '{0}'" . format ( version ) ) #NEWLINE# #UNINDENT# self . _version = _Version ( epoch = ( int ( match . group ( 'epoch' ) ) if match . group ( 'epoch' ) else 0 ) , release = tuple ( ( int ( version ) for i in match . group ( 'release' ) . split ( '.' ) ) ) , pre = _parse_letter_version ( match . group ( 'pre_l' ) , match . group ( 'pre_n' ) ) , post = _parse_letter_version ( match . group ( 'post_l' ) , ( match . group ( 'post_n1' ) or match . group ( 'post_n2' ) ) ) , dev = _parse_letter_version ( match . group ( 'dev_l' ) , match . group ( 'dev_n' ) ) , local = _parse_local_version ( match . group ( 'local' ) ) ) #NEWLINE# self . _key = _cmpkey ( self . _version . epoch , self . _version . release , self . _version . pre , self . _version . post , self . _version . dev , self . _version . local )