Beispiel #1
0
def main():
    (options, args) = parser.parse_args()
    mf = tools.ModulesFinder(source_dir=options.source,
                             external_dir=options.build_dir,
                             module_name=options.module_name)
    generate_all_cpp([x for x in mf.values()
                      if isinstance(x, tools.SourceModule)])
Beispiel #2
0
def main():
    options, apps = parser.parse_args()
    disabled = tools.split(open("build_info/disabled", "r").read(), "\n")
    if options.name in disabled:
        print("%s is disabled" % options.name)
        write_no_ok(options.name)
        tools.rmdir(os.path.join("module_bin", options.name))
        tools.rmdir(os.path.join("benchmark", options.name))
        tools.rmdir(os.path.join("lib", "IMP", options.name))
        sys.exit(1)
    mf = tools.ModulesFinder(source_dir=options.source,
                             external_dir=options.build_dir,
                             module_name=options.name)
    module = mf[options.name]
    success, modules = setup_module(module, mf)
    if success:
        make_header(options, module)
        make_doxygen(options, module, modules, mf)
        make_overview(module, apps)
        link_bin(options, module)
        link_py_apps(module)
        link_benchmark(options, module)
        sys.exit(0)
    else:
        tools.rmdir(os.path.join("module_bin", options.name))
        tools.rmdir(os.path.join("benchmark", options.name))
        tools.rmdir(os.path.join("lib", "IMP", options.name))
        sys.exit(1)
def main():
    (options, args) = parser.parse_args()
    sorted_order = tools.get_sorted_order()

    if options.module != "":
        mf = tools.ModulesFinder(source_dir=options.source,
                                 external_dir=options.build_dir,
                                 module_name=options.module)
        module = mf[options.module]
        build_wrapper(module, mf, sorted_order,
                      os.path.join("swig", "IMP_" + module.name + ".i"))
Beispiel #4
0
def main():
    (options, args) = parser.parse_args()
    mf = tools.ModulesFinder(configured_dir="build_info",
                             external_dir=options.build_dir,
                             module_name=options.module_name)
    pool = tools.thread_pool.ThreadPool()
    for m in [
            x for x in mf.values()
            if not isinstance(x, tools.ExternalModule) and x.ok
    ]:
        pool.add_task(setup_one, mf, m, options.build_system, options.swig,
                      options.build_dir, options.include)
    err = pool.wait_completion()
    if err:
        sys.stderr.write(err + '\n')
        return 1
    return 0
Beispiel #5
0
def main():
    (options, args) = parser.parse_args()
    main = []
    mf = tools.ModulesFinder(source_dir='',
                             external_dir=options.build_dir,
                             module_name=options.module_name)
    tools_dir = options.tools_dir if options.tools_dir \
                                  else '${CMAKE_SOURCE_DIR}/tools'
    extra_include = ' "--include=%s"' % options.include \
                    if options.include else ""
    extra_swig = ''.join(' "--swig_include=%s"' % s
                         for s in options.swig_include) \
                 if options.swig_include else ""
    for m in mf.get_ordered():
        if isinstance(m, tools.SourceModule):
            main.append(
                setup_module(mf, m, tools_dir, extra_include, extra_swig,
                             options.required))
Beispiel #6
0
def main():
    (options, args) = parser.parse_args()
    mf = tools.ModulesFinder(source_dir=options.source,
                             external_dir=options.build_dir,
                             module_name=options.module_name)
    all_modules = [x for x in mf.values() if isinstance(x, tools.SourceModule)]
    clean_pyc(options.source)
    tools.mkdir(os.path.join("build_info"))
    tools.mkdir(os.path.join("cmake_tests"))
    tools.rewrite(os.path.join("build_info", "disabled"),
                  options.disabled.replace(":", "\n"))
    tools.set_sorted_order([m.name for m in mf.get_ordered()])
    link_headers(all_modules)
    link_examples(all_modules)
    link_swig(all_modules)
    link_python(all_modules)
    link_data(all_modules)
    generate_tests(all_modules, options.scons)
    generate_src_dirs(all_modules)
Beispiel #7
0
def main():
    parser = OptionParser()
    parser.add_option("--build_dir", help="IMP build directory", default=None)
    parser.add_option("-s",
                      "--source",
                      dest="source",
                      help="Where to find IMP source.")

    options, args = parser.parse_args()
    if len(args) != 1:
        parser.error("You must specify an IMP module")
    module, = args

    mf = tools.ModulesFinder(source_dir=options.source,
                             external_dir=options.build_dir,
                             module_name=module)
    module = mf[module]
    build_init(module, options.source,
               os.path.join(module.path, "pyext", "src", "__init__.py"),
               os.path.join("lib", "IMP", module.name, '__init__.py'))
Beispiel #8
0
def main():
    parser = OptionParser()
    parser.add_option("--build_dir", help="IMP build directory", default=None)
    parser.add_option("--module_name", help="Module name", default=None)
    parser.add_option("-s",
                      "--source",
                      dest="source",
                      help="IMP source directory.")
    options, args = parser.parse_args()

    # Top-level version
    make_version(options.source, '.')

    # Submodule versions
    mf = tools.ModulesFinder(source_dir=options.source,
                             external_dir=options.build_dir,
                             module_name=options.module_name)
    all_modules = [x for x in mf.values() if isinstance(x, tools.SourceModule)]
    for module in all_modules:
        if os.path.exists(os.path.join(module.path, ".git")):
            make_version(module.path, os.path.join("modules", module.name))