#NEWLINE# def check_compatibility( version , name ) : #NEWLINE# #INDENT# "\n    Raises errors or warns if called with an incompatible Wheel-Version.\n\n    Pip should refuse to install a Wheel-Version that's a major series\n    ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when\n    installing a version only minor version ahead (e.g 1.2 > 1.1).\n\n    version: a 2-tuple representing a Wheel-Version (Major, Minor)\n    name: name of wheel or package to raise exception about\n\n    :raises UnsupportedWheel: when an incompatible Wheel-Version is given\n    " #NEWLINE# if ( not version ) : #NEWLINE# #INDENT# raise UnsupportedWheel ( ( '%s is in an unsupported or invalid wheel' % name ) ) #NEWLINE# #UNINDENT# if ( version [ 0 ] > VERSION_COMPATIBLE [ 0 ] ) : #NEWLINE# #INDENT# raise UnsupportedWheel ( ( "%s's Wheel-Version (%s) is not compatible with this version of pip" % ( name , '.' . join ( map ( str , version ) ) ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name > VERSION_COMPATIBLE ) : #NEWLINE# #INDENT# logger . warn ( ( 'Installing from a newer Wheel-Version (%s)' % '.' . join ( map ( str , version ) ) ) )