Skip to content

Instantly share code, notes, and snippets.

@tav
Created June 10, 2009 21:38
Show Gist options
  • Save tav/127516 to your computer and use it in GitHub Desktop.
Save tav/127516 to your computer and use it in GitHub Desktop.
# ctypes/macholib/dyld.py needs to be monkeypatched with:
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'])
for path in DEFAULT_LIBRARY_FALLBACK:
yield os.path.join(path, os.path.basename(name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment