î
i f$ ã @ s\ d Z d d l Z d g Z e j d ƒ Z d d „ Z d d „ Z e d k rX e ƒ n d S) z!
Generic dylib path manipulation
é NÚ
dylib_infoz‹(?x)
(?P^.*)(?:^|/)
(?P
(?P\w+?)
(?:\.(?P[^._]+))?
(?:_(?P[^._]+))?
\.dylib$
)
c C s# t j | ƒ } | s d S| j ƒ S)a1
A dylib name can take one of the following four forms:
Location/Name.SomeVersion_Suffix.dylib
Location/Name.SomeVersion.dylib
Location/Name_Suffix.dylib
Location/Name.dylib
returns None if not found or a mapping equivalent to:
dict(
location='Location',
name='Name.SomeVersion_Suffix.dylib',
shortname='Name',
version='SomeVersion',
suffix='Suffix',
)
Note that SomeVersion and Suffix are optional and may be None
if not present.
N)ÚDYLIB_REÚmatchÚ groupdict)ÚfilenameZis_dylib© r ú:/opt/alt/python34/lib64/python3.4/ctypes/macholib/dylib.pyr s c C s d d d d d d d „ } d S)Nc S s% t d | d | d | d | d | ƒ S)NÚlocationÚnameÚ shortnameÚversionÚsuffix)Údict)r r
r r r
r r r Úd. s ztest_dylib_info..dr )r r r r Útest_dylib_info- s r Ú__main__)Ú__doc__ÚreÚ__all__Úcompiler r r Ú__name__r r r r Ú s