parameters: (name, wheeldir)
return_statement: return False
docstring: Return True if the extracted wheel in wheeldir should go into purelib.
docstring_summary: Return True if the extracted wheel in wheeldir should go into purelib.
docstring_tokens: Return True if the extracted wheel in wheeldir should go into purelib .
function: def root_is_purelib(name, wheeldir):
      """
      Return True if the extracted wheel in wheeldir should go into purelib.
      """
      name_folded = name.replace("-", "_")
      for item in os.listdir(wheeldir):
          match = dist_info_re.match(item)
          if match and match.group('name') == name_folded:
              with open(os.path.join(wheeldir, item, 'WHEEL')) as wheel:
                  for line in wheel:
                      line = line.lower().rstrip()
                      if line == "root-is-purelib: true":
                          return True
      return False
function_tokens: def root_is_purelib ( name , wheeldir ) : name_folded = name . replace ( "-" , "_" ) for item in os . listdir ( wheeldir ) : match = dist_info_re . match ( item ) if match and match . group ( 'name' ) == name_folded : with open ( os . path . join ( wheeldir , item , 'WHEEL' ) ) as wheel : for line in wheel : line = line . lower ( ) . rstrip ( ) if line == "root-is-purelib: true" : return True return False