Example #1
0
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")
Example #2
0
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))
Example #3
0
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))
Example #4
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))
Example #5
0
def pathForFramework(path):
    fpath, name, version = infoForFramework(dyld_find(path))
    return os.path.join(fpath, name + '.framework')
Example #6
0
File: _dyld.py Project: aosm/pyobjc
def pathForFramework(path):
    fpath, name, version = infoForFramework(dyld_find(path))
    return os.path.join(fpath, name + u'.framework')