dbfdg 3 \@s>dZddlZdgZejdZddZddZedkr:edS) z% Generic framework path manipulation Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCstj|}|sdS|jS)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_frameworkr1/usr/lib64/python3.6/ctypes/macholib/framework.pyrs cCsddd}dS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd-s ztest_framework_info..d)NNNNNr)rrrrtest_framework_info,s r__main__)__doc__re__all__compilerrr__name__rrrrs