(name, wheeldir)
return False
Return True if the extracted wheel in wheeldir should go into purelib.
Return True if the extracted wheel in wheeldir should go into purelib.
Return True if the extracted wheel in wheeldir should go into purelib .
def root_is_purelib(name, wheeldir):
    # type: (str, str) -> bool
    """
    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
def root_is_purelib ( name , wheeldir ) : # type: (str, str) -> bool 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