asda?‰PNG  IHDR ? f ??C1 sRGB ??é gAMA ±? üa pHYs ? ??o¨d GIDATx^íüL”÷e÷Y?a?("Bh?_ò???¢§?q5k?*:t0A-o??¥]VkJ¢M??f?±8\k2íll£1]q?ù???T PK'he[6z$$dylib.pynu[""" Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.compile(r"""(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) """) def dylib_info(filename): """ 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. """ is_dylib = DYLIB_RE.match(filename) if not is_dylib: return None return is_dylib.groupdict() def test_dylib_info(): def d(location=None, name=None, shortname=None, version=None, suffix=None): return dict( location=location, name=name, shortname=shortname, version=version, suffix=suffix ) assert dylib_info('completely/invalid') is None assert dylib_info('completely/invalide_debug') is None assert dylib_info('P/Foo.dylib') == d('P', 'Foo.dylib', 'Foo') assert dylib_info('P/Foo_debug.dylib') == d('P', 'Foo_debug.dylib', 'Foo', suffix='debug') assert dylib_info('P/Foo.A.dylib') == d('P', 'Foo.A.dylib', 'Foo', 'A') assert dylib_info('P/Foo_debug.A.dylib') == d('P', 'Foo_debug.A.dylib', 'Foo_debug', 'A') assert dylib_info('P/Foo.A_debug.dylib') == d('P', 'Foo.A_debug.dylib', 'Foo', 'A', 'debug') if __name__ == '__main__': test_dylib_info() PK'he[K CTTfetch_macholibnuȯ#!/bin/sh svn export --force http://svn.red-bean.com/bob/macholib/trunk/macholib/ . PK'he[ Hd framework.pynu[""" Generic framework path manipulation """ import re __all__ = ['framework_info'] STRICT_FRAMEWORK_RE = re.compile(r"""(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ """) def framework_info(filename): """ 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 """ is_framework = STRICT_FRAMEWORK_RE.match(filename) if not is_framework: return None return is_framework.groupdict() def test_framework_info(): def d(location=None, name=None, shortname=None, version=None, suffix=None): return dict( location=location, name=name, shortname=shortname, version=version, suffix=suffix ) assert framework_info('completely/invalid') is None assert framework_info('completely/invalid/_debug') is None assert framework_info('P/F.framework') is None assert framework_info('P/F.framework/_debug') is None assert framework_info('P/F.framework/F') == d('P', 'F.framework/F', 'F') assert framework_info('P/F.framework/F_debug') == d('P', 'F.framework/F_debug', 'F', suffix='debug') assert framework_info('P/F.framework/Versions') is None assert framework_info('P/F.framework/Versions/A') is None assert framework_info('P/F.framework/Versions/A/F') == d('P', 'F.framework/Versions/A/F', 'F', 'A') assert framework_info('P/F.framework/Versions/A/F_debug') == d('P', 'F.framework/Versions/A/F_debug', 'F', 'A', 'debug') if __name__ == '__main__': test_framework_info() PK'he[%__pycache__/dyld.cpython-36.opt-2.pycnu[3 \E@sddlZddlmZddlmZddlTddddgZejjd d d d gZ ejjd dddgZ ddZ d*ddZ d+ddZ d,ddZd-ddZd.ddZd/ddZd0dd Zd1d!d"Zd2d#d$Zd3d%dZd4d&dZd'd(Zed)kredS)5N)framework_info) dylib_info)* dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}|j|}|dkr$gS|jdS)N:)osenvirongetsplit)envvarZrvalr,/usr/lib64/python3.6/ctypes/macholib/dyld.pydyld_envs  rcCs|dkrtj}|jdS)NZDYLD_IMAGE_SUFFIX)rr r )r rrrdyld_image_suffix'srcCs t|dS)NZDYLD_FRAMEWORK_PATH)r)r rrrdyld_framework_path,srcCs t|dS)NZDYLD_LIBRARY_PATH)r)r rrrdyld_library_path/srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)r rrrdyld_fallback_framework_path2srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATH)r)r rrrdyld_fallback_library_path5srcCs(t|}|dkr|S||fdd}|S)NcssJxD|D]<}|jdr2|dtd |dVn ||V|VqWdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr_inject=s    z)dyld_image_suffix_search.._inject)r)rr rrrrrdyld_image_suffix_search8s rccsdt|}|dk r6x$t|D]}tjj||dVqWx(t|D]}tjj|tjj|Vq@WdS)Nname)rrrrjoinrbasename)rr frameworkrrrrdyld_override_searchFs r!ccs2|jdr.|dk r.tjj||tddVdS)Nz@executable_path/) startswithrrrr)rexecutable_pathrrrdyld_executable_path_searchWsr$ccs|Vt|}|dk r@t|}x |D]}tjj||dVq$Wt|}x$|D]}tjj|tjj|VqNW|dk r| rx tD]}tjj||dVqW|sx$tD]}tjj|tjj|VqWdS)Nr) rrrrrrrDEFAULT_FRAMEWORK_FALLBACKDEFAULT_LIBRARY_FALLBACK)rr r Zfallback_framework_pathrZfallback_library_pathrrrdyld_default_search^s    r'cCsPxs8               PK'he[m^hz%%#__pycache__/__init__.cpython-36.pycnu[3 \@s dZdZdS)z~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. z1.0N)__doc__ __version__rr0/usr/lib64/python3.6/ctypes/macholib/__init__.pysPK'he[m^hz%%)__pycache__/__init__.cpython-36.opt-1.pycnu[3 \@s dZdZdS)z~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. z1.0N)__doc__ __version__rr0/usr/lib64/python3.6/ctypes/macholib/__init__.pysPK'he[*S+ __pycache__/dylib.cpython-36.pycnu[3 \$@s>dZddlZdgZejdZddZddZedkr:edS) z! Generic dylib path manipulation N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCstj|}|sdS|jS)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_REmatch groupdict)filenameZis_dylibr-/usr/lib64/python3.6/ctypes/macholib/dylib.pyrs cCsddd}tddksttddks*ttd|dddksBttd |dd dd d ks^ttd |ddddksxttd|ddddksttd|ddddd kstdS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd.s ztest_dylib_info..dzcompletely/invalidzcompletely/invalide_debugz P/Foo.dylibPz Foo.dylibZFoozP/Foo_debug.dylibzFoo_debug.dylibdebug)r z P/Foo.A.dylibz Foo.A.dylibAzP/Foo_debug.A.dylibzFoo_debug.A.dylibZ Foo_debugzP/Foo.A_debug.dylibzFoo.A_debug.dylib)NNNNN)rAssertionError)rrrrtest_dylib_info-s r__main__)__doc__re__all__compilerrr__name__rrrrsPK'he[>5ʘ$__pycache__/framework.cpython-36.pycnu[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}tddksttddks*ttddks:ttddksJttd|dd d ksbttd |dd d d dks~ttddksttddksttd|ddd dksttd|ddd dd kstdS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd-s ztest_framework_info..dzcompletely/invalidzcompletely/invalid/_debugz P/F.frameworkzP/F.framework/_debugzP/F.framework/FPz F.framework/FFzP/F.framework/F_debugzF.framework/F_debugdebug)r zP/F.framework/VersionszP/F.framework/Versions/AzP/F.framework/Versions/A/FzF.framework/Versions/A/FAz P/F.framework/Versions/A/F_debugzF.framework/Versions/A/F_debug)NNNNN)rAssertionError)rrrrtest_framework_info,s r__main__)__doc__re__all__compilerrr__name__rrrrsPK'he[Η14[[&__pycache__/dylib.cpython-36.opt-2.pycnu[3 \$@s:ddlZdgZejdZddZddZedkr6edS)N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCstj|}|sdS|jS)N)DYLIB_REmatch groupdict)filenameZis_dylibr-/usr/lib64/python3.6/ctypes/macholib/dylib.pyrs cCsddd}dS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd.s ztest_dylib_info..d)NNNNNr)rrrrtest_dylib_info-s r__main__)re__all__compilerrr__name__rrrrsPK'he[KW*__pycache__/framework.cpython-36.opt-2.pycnu[3 \@s:ddlZdgZejdZddZddZedkr6edS)Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCstj|}|sdS|jS)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__)re__all__compilerrr__name__rrrrsPK'he[M)__pycache__/__init__.cpython-36.opt-2.pycnu[3 \@sdZdS)z1.0N) __version__rr0/usr/lib64/python3.6/ctypes/macholib/__init__.py sPK'he[.&__pycache__/dylib.cpython-36.opt-1.pycnu[3 \$@s>dZddlZdgZejdZddZddZedkr:edS) z! Generic dylib path manipulation N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCstj|}|sdS|jS)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_REmatch groupdict)filenameZis_dylibr-/usr/lib64/python3.6/ctypes/macholib/dylib.pyrs cCsddd}dS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd.s ztest_dylib_info..d)NNNNNr)rrrrtest_dylib_info-s r__main__)__doc__re__all__compilerrr__name__rrrrsPK'he[AA%__pycache__/dyld.cpython-36.opt-1.pycnu[3 \E@sdZddlZddlmZddlmZddlTdddd gZejj d d d d gZ ejj ddddgZ ddZ d+ddZ d,ddZd-ddZd.ddZd/ddZd0ddZd1d d!Zd2d"d#Zd3d$d%Zd4d&dZd5d'dZd(d)Zed*kredS)6z dyld emulation N)framework_info) dylib_info)* dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}|j|}|dkr$gS|jdS)N:)osenvirongetsplit)envvarZrvalr,/usr/lib64/python3.6/ctypes/macholib/dyld.pydyld_envs  rcCs|dkrtj}|jdS)NZDYLD_IMAGE_SUFFIX)rr r )r rrrdyld_image_suffix'srcCs t|dS)NZDYLD_FRAMEWORK_PATH)r)r rrrdyld_framework_path,srcCs t|dS)NZDYLD_LIBRARY_PATH)r)r rrrdyld_library_path/srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)r rrrdyld_fallback_framework_path2srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATH)r)r rrrdyld_fallback_library_path5srcCs(t|}|dkr|S||fdd}|S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssJxD|D]<}|jdr2|dtd |dVn ||V|VqWdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr_inject=s    z)dyld_image_suffix_search.._inject)r)rr rrrrrdyld_image_suffix_search8s rccsdt|}|dk r6x$t|D]}tjj||dVqWx(t|D]}tjj|tjj|Vq@WdS)Nname)rrrrjoinrbasename)rr frameworkrrrrdyld_override_searchFs r!ccs2|jdr.|dk r.tjj||tddVdS)Nz@executable_path/) startswithrrrr)rexecutable_pathrrrdyld_executable_path_searchWsr$ccs|Vt|}|dk r@t|}x |D]}tjj||dVq$Wt|}x$|D]}tjj|tjj|VqNW|dk r| rx tD]}tjj||dVqW|sx$tD]}tjj|tjj|VqWdS)Nr) rrrrrrrDEFAULT_FRAMEWORK_FALLBACKDEFAULT_LIBRARY_FALLBACK)rr r Zfallback_framework_pathrZfallback_library_pathrrrdyld_default_search^s    r'cCsPxs:               PK'he[ 9rII*__pycache__/framework.cpython-36.opt-1.pycnu[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__rrrrsPK'he["__pycache__/dyld.cpython-36.pycnu[3 \E@sdZddlZddlmZddlmZddlTdddd gZejj d d d d gZ ejj ddddgZ ddZ d+ddZ d,ddZd-ddZd.ddZd/ddZd0ddZd1d d!Zd2d"d#Zd3d$d%Zd4d&dZd5d'dZd(d)Zed*kredS)6z dyld emulation N)framework_info) dylib_info)* dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}|j|}|dkr$gS|jdS)N:)osenvirongetsplit)envvarZrvalr,/usr/lib64/python3.6/ctypes/macholib/dyld.pydyld_envs  rcCs|dkrtj}|jdS)NZDYLD_IMAGE_SUFFIX)rr r )r rrrdyld_image_suffix'srcCs t|dS)NZDYLD_FRAMEWORK_PATH)r)r rrrdyld_framework_path,srcCs t|dS)NZDYLD_LIBRARY_PATH)r)r rrrdyld_library_path/srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)r rrrdyld_fallback_framework_path2srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATH)r)r rrrdyld_fallback_library_path5srcCs(t|}|dkr|S||fdd}|S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssJxD|D]<}|jdr2|dtd |dVn ||V|VqWdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr_inject=s    z)dyld_image_suffix_search.._inject)r)rr rrrrrdyld_image_suffix_search8s rccsdt|}|dk r6x$t|D]}tjj||dVqWx(t|D]}tjj|tjj|Vq@WdS)Nname)rrrrjoinrbasename)rr frameworkrrrrdyld_override_searchFs r!ccs2|jdr.|dk r.tjj||tddVdS)Nz@executable_path/) startswithrrrr)rexecutable_pathrrrdyld_executable_path_searchWsr$ccs|Vt|}|dk r@t|}x |D]}tjj||dVq$Wt|}x$|D]}tjj|tjj|VqNW|dk r| rx tD]}tjj||dVqW|sx$tD]}tjj|tjj|VqWdS)Nr) rrrrrrrDEFAULT_FRAMEWORK_FALLBACKDEFAULT_LIBRARY_FALLBACK)rr r Zfallback_framework_pathrZfallback_library_pathrrrdyld_default_search^s    r'cCsPxs:               PK'he[J(( README.ctypesnu[Files in this directory come from Bob Ippolito's py2app. License: Any components of the py2app suite may be distributed under the MIT or PSF open source licenses. This is version 1.0, SVN revision 789, from 2006/01/25. The main repository is http://svn.red-bean.com/bob/macholib/trunk/macholib/PK'he[;kEEdyld.pynu[""" dyld emulation """ import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * __all__ = [ 'dyld_find', 'framework_find', 'framework_info', 'dylib_info', ] # These are the defaults as per man dyld(1) # DEFAULT_FRAMEWORK_FALLBACK = [ os.path.expanduser("~/Library/Frameworks"), "/Library/Frameworks", "/Network/Library/Frameworks", "/System/Library/Frameworks", ] DEFAULT_LIBRARY_FALLBACK = [ os.path.expanduser("~/lib"), "/usr/local/lib", "/lib", "/usr/lib", ] def dyld_env(env, var): if env is None: env = os.environ rval = env.get(var) if rval is None: return [] return rval.split(':') def dyld_image_suffix(env=None): if env is None: env = os.environ return env.get('DYLD_IMAGE_SUFFIX') def dyld_framework_path(env=None): return dyld_env(env, 'DYLD_FRAMEWORK_PATH') def dyld_library_path(env=None): return dyld_env(env, 'DYLD_LIBRARY_PATH') def dyld_fallback_framework_path(env=None): return dyld_env(env, 'DYLD_FALLBACK_FRAMEWORK_PATH') def dyld_fallback_library_path(env=None): return dyld_env(env, 'DYLD_FALLBACK_LIBRARY_PATH') def dyld_image_suffix_search(iterator, env=None): """For a potential path iterator, add DYLD_IMAGE_SUFFIX semantics""" suffix = dyld_image_suffix(env) if suffix is None: return iterator def _inject(iterator=iterator, suffix=suffix): for path in iterator: if path.endswith('.dylib'): yield path[:-len('.dylib')] + suffix + '.dylib' else: yield path + suffix yield path return _inject() def dyld_override_search(name, env=None): # If DYLD_FRAMEWORK_PATH is set and this dylib_name is a # framework name, use the first file that exists in the framework # path if any. If there is none go on to search the DYLD_LIBRARY_PATH # if any. framework = framework_info(name) if framework is not None: for path in dyld_framework_path(env): yield os.path.join(path, framework['name']) # If DYLD_LIBRARY_PATH is set then use the first file that exists # in the path. If none use the original name. for path in dyld_library_path(env): yield os.path.join(path, os.path.basename(name)) def dyld_executable_path_search(name, executable_path=None): # If we haven't done any searching and found a library and the # dylib_name starts with "@executable_path/" then construct the # library name. if name.startswith('@executable_path/') and executable_path is not None: yield os.path.join(executable_path, name[len('@executable_path/'):]) def dyld_default_search(name, env=None): yield name framework = framework_info(name) if framework is not None: fallback_framework_path = dyld_fallback_framework_path(env) for path in fallback_framework_path: yield os.path.join(path, framework['name']) fallback_library_path = dyld_fallback_library_path(env) for path in fallback_library_path: yield os.path.join(path, os.path.basename(name)) if framework is not None and not fallback_framework_path: for path in DEFAULT_FRAMEWORK_FALLBACK: yield os.path.join(path, framework['name']) if not fallback_library_path: for path in DEFAULT_LIBRARY_FALLBACK: yield os.path.join(path, os.path.basename(name)) def dyld_find(name, executable_path=None, env=None): """ Find a library or framework using dyld semantics """ for path in dyld_image_suffix_search(chain( dyld_override_search(name, env), dyld_executable_path_search(name, executable_path), dyld_default_search(name, env), ), env): if os.path.isfile(path): return path raise ValueError("dylib %s could not be found" % (name,)) def framework_find(fn, executable_path=None, env=None): """ Find a framework using dyld semantics in a very loose manner. Will take input such as: Python Python.framework Python.framework/Versions/Current """ error = None try: return dyld_find(fn, executable_path=executable_path, env=env) except ValueError as e: error = e fmwk_index = fn.rfind('.framework') if fmwk_index == -1: fmwk_index = len(fn) fn += '.framework' fn = os.path.join(fn, os.path.basename(fn[:fmwk_index])) try: return dyld_find(fn, executable_path=executable_path, env=env) except ValueError: raise error def test_dyld_find(): env = {} assert dyld_find('libSystem.dylib') == '/usr/lib/libSystem.dylib' assert dyld_find('System.framework/System') == '/System/Library/Frameworks/System.framework/System' if __name__ == '__main__': test_dyld_find() PK'he[t7y __init__.pynu[""" Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. """ __version__ = '1.0' PK'he[6z$$dylib.pynu[PK'he[K CTT\fetch_macholibnuȯPK'he[ Hd framework.pynu[PK'he[%__pycache__/dyld.cpython-36.opt-2.pycnu[PK'he[m^hz%%# __pycache__/__init__.cpython-36.pycnu[PK'he[m^hz%%){!__pycache__/__init__.cpython-36.opt-1.pycnu[PK'he[*S+ "__pycache__/dylib.cpython-36.pycnu[PK'he[>5ʘ$*__pycache__/framework.cpython-36.pycnu[PK'he[Η14[[&3__pycache__/dylib.cpython-36.opt-2.pycnu[PK'he[KW*f7__pycache__/framework.cpython-36.opt-2.pycnu[PK'he[M)Q;__pycache__/__init__.cpython-36.opt-2.pycnu[PK'he[.&@<__pycache__/dylib.cpython-36.opt-1.pycnu[PK'he[AA%YB__pycache__/dyld.cpython-36.opt-1.pycnu[PK'he[ 9rII*R__pycache__/framework.cpython-36.opt-1.pycnu[PK'he["Y__pycache__/dyld.cpython-36.pycnu[PK'he[J(( jREADME.ctypesnu[PK'he[;kEE3ldyld.pynu[PK'he[t7y __init__.pynu[PK