Example #1
0
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 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))
Example #3
0
def pathForFramework(path):
    fpath, name, version = infoForFramework(dyld_find(path))
    return os.path.join(fpath, name + u'.framework')
def pathForFramework(path):
    fpath, name, version = infoForFramework(dyld_find(path))
    return os.path.join(fpath, name + u'.framework')