def make_package_relative(workdir, spec, allow_root):
    '\n    Change paths in binaries to relative paths. Change absolute symlinks\n    to relative symlinks.\n    '
    prefix = spec.prefix
    buildinfo = read_buildinfo_file(workdir)
    old_layout_root = buildinfo['buildpath']
    orig_path_names = list()
    cur_path_names = list()
    for filename in buildinfo['relocate_binaries']:
        orig_path_names.append(os.path.join(prefix, filename))
        cur_path_names.append(os.path.join(workdir, filename))
    if ((spec.architecture.platform == 'darwin') or ((spec.architecture.platform == 'test') and (platform.system().lower() == 'darwin'))):
        relocate.make_macho_binaries_relative(cur_path_names, orig_path_names, old_layout_root)
    if ((spec.architecture.platform == 'linux') or ((spec.architecture.platform == 'test') and (platform.system().lower() == 'linux'))):
        relocate.make_elf_binaries_relative(cur_path_names, orig_path_names, old_layout_root)
    relocate.check_files_relocatable(cur_path_names, allow_root)
    orig_path_names = list()
    cur_path_names = list()
    for linkname in buildinfo.get('relocate_links', []):
        orig_path_names.append(os.path.join(prefix, linkname))
        cur_path_names.append(os.path.join(workdir, linkname))
    relocate.make_link_relative(cur_path_names, orig_path_names)
Change paths in binaries to relative paths. Change absolute symlinks
to relative symlinks.
def make_package_relative(workdir, spec, allow_root):
    '\n    Change paths in binaries to relative paths. Change absolute symlinks\n    to relative symlinks.\n    '
    prefix = spec.prefix
    buildinfo = read_buildinfo_file(workdir)
    old_layout_root = buildinfo['buildpath']
    orig_path_names = list()
    cur_path_names = list()
    for filename in buildinfo['relocate_binaries']:
        orig_path_names.append(os.path.join(prefix, filename))
        cur_path_names.append(os.path.join(workdir, filename))
    if ((spec.architecture.platform == 'darwin') or ((spec.architecture.platform == 'test') and (platform.system().lower() == 'darwin'))):
        relocate.make_macho_binaries_relative(cur_path_names, orig_path_names, old_layout_root)
    if ((spec.architecture.platform == 'linux') or ((spec.architecture.platform == 'test') and (platform.system().lower() == 'linux'))):
        relocate.make_elf_binaries_relative(cur_path_names, orig_path_names, old_layout_root)
    relocate.check_files_relocatable(cur_path_names, allow_root)
    orig_path_names = list()
    cur_path_names = list()
    for linkname in buildinfo.get('relocate_links', []):
        orig_path_names.append(os.path.join(prefix, linkname))
        cur_path_names.append(os.path.join(workdir, linkname))
    relocate.make_link_relative(cur_path_names, orig_path_names)