def pathForFramework(path): if path.startswith("/System/"): # On macOS 11 system frameworks are in a shared cache, not # in the filesystem. return path fpath, name, version = infoForFramework(dyld_find(path)) return os.path.join(fpath, name + ".framework")
def dyld_find(filename): """Generic way to locate a dyld framework or dyld""" filename = os.path.realpath(filename) res = infoForFramework(filename) if res: framework_loc, framework_name, version = res return dyld_framework(filename, framework_name, version) else: return dyld_library(filename, os.path.basename(filename))
def dyld_find(filename): """Generic way to locate a dyld framework or dyld""" # if they passed in a framework directory, not a mach-o file # then go ahead and look where one would expect to find the mach-o # filename = ensure_unicode(filename) # if os.path.isdir(filename): # filename = os.path.join( # filename, # os.path.basename(filename)[:-len(os.path.splitext(filename)[-1])] # ) filename = _realpath(filename) res = infoForFramework(filename) if res: framework_loc, framework_name, version = res return dyld_framework(filename, framework_name, version) else: return dyld_library(filename, os.path.basename(filename))
def pathForFramework(path): fpath, name, version = infoForFramework(dyld_find(path)) return os.path.join(fpath, name + '.framework')
def pathForFramework(path): fpath, name, version = infoForFramework(dyld_find(path)) return os.path.join(fpath, name + u'.framework')