Пример #1
0
            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])
        if P.getsize(debuglist.name) > 0:
            mgr.make_tarball(include = debuglist.name, name = '%s-debug.tar.gz' % mgr.tarname)
    finally:
        if not opt.keeptemp:
            mgr.remove_tempdir()
Пример #2
0
        # We don't want to distribute with ASP any random files in
        # 'docs' installed by any of its deps. Distribute only
        # what we need.
        for f in glob(P.join(INSTALLDIR.doc(), '*')):
            base_f = os.path.basename(f)
            if base_f not in [
                    'AUTHORS', 'COPYING', 'INSTALLGUIDE', 'NEWS', 'README',
                    'THIRDPARTYLICENSES', 'examples'
            ]:
                try:
                    os.remove(f)
                except Exception:
                    pass
#         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')
        sys.stdout.flush()
        mgr.bake(map(lambda path: P.relpath(path, INSTALLDIR), SEARCHPATH))

        debuglist = mgr.find_filter('-name', '*.debug')

        mgr.make_tarball(exclude=[debuglist.name])
    finally:
        if not opt.keeptemp:
            mgr.remove_tempdir()
Пример #3
0
        # To do: Don't depend on cwd
        for dir in ['dist-add']:
            if P.exists(dir):
                mgr.add_directory(dir)

        print('\tRemoving system libs')
        sys.stdout.flush()
        mgr.remove_already_added(LIB_SYSTEM_LIST)

        print('Baking RPATH and stripping binaries')
        sys.stdout.flush()
        # Create relative paths from SEARCHPATH. Use only the first two items,
        # hence just the values 'lib' and 'lib64'.
        rel_search_path = list(
            map(lambda path: P.relpath(path, INSTALLDIR), SEARCHPATH[0:2]))
        mgr.bake(rel_search_path)

        debug_list_name = ''
        try:
            debuglist = mgr.find_filter('-name', '*.debug')
            debug_list_name = debuglist.name
        except:
            pass

        mgr.make_tarball(exclude=[debug_list_name])
        if P.getsize(debug_list_name) > 0 and opt.debug_build:
            mgr.make_tarball(include=debug_list_name,
                             name='%s-debug.tar.bz2' % mgr.tarname)
    finally:
        if not opt.keeptemp:
            mgr.remove_tempdir()