î i f™ã@s\dZddlZdgZejdƒZdd„Zdd„ZedkrXeƒndS) z% Generic framework path manipulation éNÚframework_infoz¢(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCs#tj|ƒ}|sdS|jƒ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_REÚmatchÚ groupdict)ÚfilenameZ is_framework©rú>/opt/alt/python34/lib64/python3.4/ctypes/macholib/framework.pyrscCsddddddd„}dS)Nc Ss%td|d|d|d|d|ƒS)NÚlocationÚnameÚ shortnameÚversionÚsuffix)Údict)r r r r r rrrÚd-s ztest_framework_info..dr)rrrrÚtest_framework_info,srÚ__main__)Ú__doc__ÚreÚ__all__ÚcompilerrrÚ__name__rrrrÚs