# Handle the shiplist separately for copy_lib in LIB_SHIP_PREFIX: found = None for soname in mgr.deplist.keys(): if soname.startswith(copy_lib): found = soname break if found: mgr.add_library(mgr.deplist[found]) mgr.remove_deps([found]) print('\tRemoving system libs') mgr.remove_deps(LIB_SYSTEM_LIST) print('\tFinding deps in search path') mgr.resolve_deps(nocopy = [P.join(ISISROOT, 'lib'), P.join(ISISROOT, '3rdParty', 'lib')], copy = [INSTALLDIR.lib()]) if mgr.deplist: raise Exception('Failed to find some libs in any of our dirs:\n\t%s' % '\n\t'.join(mgr.deplist.keys())) print('Adding files in dist-add and docs') #XXX Don't depend on cwd for dir in 'dist-add', INSTALLDIR.doc(): if P.exists(dir): mgr.add_directory(dir) print('Baking RPATH and stripping binaries') mgr.bake(map(lambda path: P.relpath(path, INSTALLDIR), SEARCHPATH)) debuglist = mgr.find_filter('-name', '*.debug') mgr.make_tarball(exclude = [debuglist.name])
# libgfortran.so.1, and sometimes the wrong one is picked. if mgr.deplist[soname] in found_set: continue found_set.add(mgr.deplist[soname]) mgr.add_library(mgr.deplist[soname]) found_and_to_be_removed.append( soname ) mgr.remove_deps( found_and_to_be_removed ) print('\tRemoving system libs') sys.stdout.flush() mgr.remove_deps(LIB_SYSTEM_LIST) print('\tFinding deps in search path') sys.stdout.flush() mgr.resolve_deps(nocopy = [P.join(ISISROOT, 'lib'), P.join(ISISROOT, '3rdParty', 'lib')], copy = SEARCHPATH + ['/opt/X11/lib', '/usr/lib', '/usr/lib64', '/lib64', '/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks']) # TODO: Including system libraries rather than libaries we build ourselves may be dangerous! if mgr.deplist: if not opt.force_continue: # For each lib, print who uses it: for lib in mgr.deplist.keys(): if lib in mgr.parentlib.keys(): print("Library " + lib + " is not found, and is needed by " + " ".join(mgr.parentlib[lib]) + "\n" ) raise Exception('Failed to find some libs in any of our dirs:\n\t%s' % '\n\t'.join(mgr.deplist.keys())) else: print("Warning: missing libs: " + '\n\t'.join(mgr.deplist.keys()) + "\n") # We don't want to distribute with ASP any random files in # 'docs' installed by any of its deps. Distribute only what we need. # - In the VW build clean out docs completely because we still get junk
# libgfortran.so.1, and sometimes the wrong one is picked. if mgr.deplist[soname] in found_set: continue found_set.add(mgr.deplist[soname]) mgr.add_library(mgr.deplist[soname]) found_and_to_be_removed.append( soname ) mgr.remove_deps( found_and_to_be_removed ) print('\tRemoving system libs') sys.stdout.flush() mgr.remove_deps(LIB_SYSTEM_LIST) print('\tFinding deps in search path') sys.stdout.flush() mgr.resolve_deps(nocopy = [P.join(ISISROOT, 'lib'), P.join(ISISROOT, '3rdParty', 'lib')], copy = SEARCHPATH + ['/opt/X11/lib', '/usr/lib', '/usr/lib64', '/lib64', '/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks']) # TODO: Including system libraries rather than libaries we build ourselves may be dangerous! if mgr.deplist: if not opt.force_continue: # For each lib, print who uses it: for lib in mgr.deplist.keys(): if lib in mgr.parentlib.keys(): print("Library " + lib + " is not found, and is needed by " + " ".join(mgr.parentlib[lib]) + "\n" ) raise Exception('Failed to find some libs in any of our dirs:\n\t%s' % '\n\t'.join(mgr.deplist.keys())) else: print("Warning: missing libs: " + '\n\t'.join(mgr.deplist.keys()) + "\n") print('Adding files in dist-add') sys.stdout.flush() # To do: Don't depend on cwd
found_and_to_be_removed.append(soname) mgr.remove_deps(found_and_to_be_removed) print('\tRemoving system libs') sys.stdout.flush() mgr.remove_deps(LIB_SYSTEM_LIST) print('\tFinding deps in search path') sys.stdout.flush() mgr.resolve_deps(nocopy = [P.join(ISISROOT, 'lib'), P.join(ISISROOT, '3rdParty', 'lib')], copy = SEARCHPATH + \ ['/opt/X11/lib', '/usr/lib', '/usr/lib64', '/lib64', '/usr/lib/x86_64-linux-gnu/mesa', '/usr/lib/x86_64-linux-gnu/mesa-egl', '/lib/x86_64-linux-gnu', '/usr/lib/x86_64-linux-gnu', '/System/Library/Frameworks', '/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks', '/opt/local/lib/libomp' ]) # TODO: Including system libraries rather than libaries we build ourselves may be dangerous! if mgr.deplist: if not opt.force_continue: # For each lib, print who uses it: for lib in mgr.deplist.keys(): if lib in mgr.parentlib.keys(): print("Library " + lib + " is not found, and is needed by " \ + " ".join(mgr.parentlib[lib]) + "\n" ) raise Exception('Failed to find some libs in any of our dirs:\n\t%s' % \
# libgfortran.so.1, and sometimes the wrong one is picked. if mgr.deplist[soname] in found_set: continue found_set.add(mgr.deplist[soname]) mgr.add_library(mgr.deplist[soname]) found_and_to_be_removed.append(soname) mgr.remove_deps(found_and_to_be_removed) print('\tRemoving system libs') sys.stdout.flush() mgr.remove_deps(LIB_SYSTEM_LIST) print('\tFinding deps in search path') sys.stdout.flush() mgr.resolve_deps(nocopy=[ P.join(ISISROOT, 'lib'), P.join(ISISROOT, '3rdParty', 'lib') ], copy=[INSTALLDIR.lib()]) if mgr.deplist: raise Exception( 'Failed to find some libs in any of our dirs:\n\t%s' % '\n\t'.join(mgr.deplist.keys())) print('Adding files in dist-add and docs') sys.stdout.flush() # To do: Don't depend on cwd for dir in 'dist-add', INSTALLDIR.doc(): if P.exists(dir): mgr.add_directory(dir) print('Baking RPATH and stripping binaries')