U ,a@s>dZddlZdgZedZddZddZedkr:edS) z% Generic framework path manipulation Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCst|}|sdS|S)a} A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr>/opt/alt/python38/lib64/python3.8/ctypes/macholib/framework.pyrs cCsddd}dS)NcSst|||||dS)NlocationnameZ shortnameversionsuffix)dictr rrrd-sztest_framework_info..d)NNNNNr)rrrrtest_framework_info,s r__main__)__doc__re__all__compilerrr__name__rrrrs