def mk_relative_osx(path): assert sys.platform == 'darwin' and is_obj(path) macho.install_name_change(path, osx_ch_link) if path.endswith('.dylib'): # note that not every MachO binaries is a "dynamically linked shared # library" which have an identification name, a .so C extensions # extensions is a "bundle". One can verify this using the "file" # command. names = macho.otool(path) if names: args = ['install_name_tool','-id', basename(names[0]), path] print ' '.join(args) check_call(args) for name in macho.otool(path): assert not name.startswith(build_prefix), path
def main(): for fn in os.listdir(LIBVTK): path = join(LIBVTK, fn) if macho.is_macho(path): print 'path=', path, 'is macho' macho.install_name_change(path, ch_link_libvtk) for fn in os.listdir(BIN): path = join(BIN, fn) if macho.is_macho(path): macho.install_name_change(path, ch_link_bin) for fn in os.listdir(SP_VTK): path = join(SP_VTK, fn) if macho.is_macho(path): # print 'PYTHON VTK=',path macho.install_name_change(path, ch_link_spvtk)
def main(): for fn in os.listdir(LIBVTK): path = join(LIBVTK, fn) if macho.is_macho(path): print 'path=',path, 'is macho' macho.install_name_change(path, ch_link_libvtk) for fn in os.listdir(BIN): path = join(BIN, fn) if macho.is_macho(path): macho.install_name_change(path, ch_link_bin) for fn in os.listdir(SP_VTK): path = join(SP_VTK, fn) if macho.is_macho(path): # print 'PYTHON VTK=',path macho.install_name_change(path, ch_link_spvtk)