def compatible_platforms(provided, required):
 if ((provided is None) or (required is None) or (provided == required)):
  return True
 reqMac = macosVersionString.match(required)
 if reqMac:
  provMac = macosVersionString.match(provided)
  if (not provMac):
   provDarwin = darwinVersionString.match(provided)
   if provDarwin:
    dversion = int(provDarwin.group(1))
    macosversion = ('%s.%s' % (reqMac.group(1), reqMac.group(2)))
    if (((dversion == 7) and (macosversion >= '10.3')) or ((dversion == 8) and (macosversion >= '10.4'))):
     return True
   return False
  if ((provMac.group(1) != reqMac.group(1)) or (provMac.group(3) != reqMac.group(3))):
   return False
  if (int(provMac.group(2)) > int(reqMac.group(2))):
   return False
  return True
 return False

def compatible_platforms ( provided , required ) : if ( ( provided is None ) or ( required is None ) or ( provided == required ) ) : return True reqMac = macosVersionString . match ( required ) if reqMac : provMac = macosVersionString . match ( provided ) if ( not provMac ) : provDarwin = darwinVersionString . match ( provided ) if provDarwin : dversion = int ( provDarwin . group ( 1 ) ) macosversion = ( '%s.%s' % ( reqMac . group ( 1 ) , reqMac . group ( 2 ) ) ) if ( ( ( dversion == 7 ) and ( macosversion >= '10.3' ) ) or ( ( dversion == 8 ) and ( macosversion >= '10.4' ) ) ) : return True return False if ( ( provMac . group ( 1 ) != reqMac . group ( 1 ) ) or ( provMac . group ( 3 ) != reqMac . group ( 3 ) ) ) : return False if ( int ( provMac . group ( 2 ) ) > int ( reqMac . group ( 2 ) ) ) : return False return True return False
can code for the provided platform run on the required platform? returns true if either platform is none .