def osx_ch_link(path, link): assert path.startswith(build_prefix + "/") reldir = utils.rel_lib(path[len(build_prefix) + 1 :]) if link.startswith((build_prefix + "/lib", "lib", "@executable_path/")): return "@loader_path/%s/%s" % (reldir, basename(link)) if link == "/usr/local/lib/libgcc_s.1.dylib": return "/usr/lib/libgcc_s.1.dylib"
def osx_ch_link(path, link): assert path.startswith(build_prefix + '/') reldir = utils.rel_lib(path[len(build_prefix) + 1:]) if link.startswith((build_prefix + '/lib', 'lib', '@executable_path/')): return '@loader_path/%s/%s' % (reldir, basename(link)) if link == '/usr/local/lib/libgcc_s.1.dylib': return '/usr/lib/libgcc_s.1.dylib'
def mk_relative(f): assert sys.platform != 'win32' if f.startswith('bin/'): fix_shebang(f) path = join(build_prefix, f) if sys.platform.startswith('linux') and is_obj(path): rpath = '$ORIGIN/' + utils.rel_lib(f) chrpath = external.find_executable('chrpath') call([chrpath, '-r', rpath, path]) if sys.platform == 'darwin' and is_obj(path): mk_relative_osx(path)
def mk_relative(f, binary_relocation=True): assert sys.platform != 'win32' if not binary_relocation: return path = join(config.build_prefix, f) if sys.platform.startswith('linux') and is_obj(path): rpath = '$ORIGIN/' + utils.rel_lib(f) patchelf = external.find_executable('patchelf') print('patchelf: file: %s\n setting rpath to: %s' % (path, rpath)) call([patchelf, '--set-rpath', rpath, path]) if sys.platform == 'darwin' and is_obj(path): mk_relative_osx(path)
def mk_relative(f, binary_relocation=True): assert sys.platform != "win32" if f.startswith("bin/"): fix_shebang(f) if not binary_relocation: return path = join(build_prefix, f) if sys.platform.startswith("linux") and is_obj(path): rpath = "$ORIGIN/" + utils.rel_lib(f) patchelf = external.find_executable("patchelf") print("patchelf: file: %s\n setting rpath to: %s" % (path, rpath)) call([patchelf, "--set-rpath", rpath, path]) if sys.platform == "darwin" and is_obj(path): mk_relative_osx(path)