コード例 #1
0
def make_package_placeholder(workdir, prefix, allow_root):
    """
    Change paths in binaries to placeholder paths
    """
    buildinfo = read_buildinfo_file(workdir)
    cur_path_names = list()
    for filename in buildinfo['relocate_binaries']:
        cur_path_names.append(os.path.join(workdir, filename))
    relocate.make_binary_placeholder(cur_path_names, allow_root)

    cur_path_names = list()
    for filename in buildinfo.get('relocate_links', []):
        cur_path_names.append(os.path.join(workdir, filename))
    relocate.make_link_placeholder(cur_path_names, workdir, prefix)
コード例 #2
0
ファイル: binary_distribution.py プロジェクト: wdmapp/spack
def make_package_placeholder(workdir, spec, allow_root):
    """
    Check if package binaries are relocatable.
    Change links to placeholder links.
    """
    prefix = spec.prefix
    buildinfo = read_buildinfo_file(workdir)
    cur_path_names = list()
    for filename in buildinfo['relocate_binaries']:
        cur_path_names.append(os.path.join(workdir, filename))
    relocate.check_files_relocatable(cur_path_names, allow_root)

    cur_path_names = list()
    for filename in buildinfo.get('relocate_links', []):
        cur_path_names.append(os.path.join(workdir, filename))
    relocate.make_link_placeholder(cur_path_names, workdir, prefix)