示例#1
0
def setup_application(application, source, datapath, scons):
    print "Configuring application", application, "...",
    data= tools.get_application_description(source, application, datapath)
    for d in data["required_dependencies"]:
        if not tools.get_dependency_info(d, datapath)["ok"]:
            write_no_ok(application, scons)
            #exits
    dependencies = data["required_dependencies"]
    unfound_dependencies = []
    for d in data["optional_dependencies"]:
        if tools.get_dependency_info(d, datapath)["ok"]:
            dependencies.append(d)
        else:
            unfound_dependencies.append(d)
    for d in data["required_modules"]:
        if not tools.get_module_info(d, datapath)["ok"]:
            write_no_ok(application, scons)
            # exits
    modules= data["required_modules"]
    unfound_modules = []
    for d in data["optional_modules"]:
        if tools.get_module_info(d, datapath)["ok"]:
            modules.append(d)
        else:
            unfound_modules.append(d)
    all_modules=tools.get_dependent_modules(modules, datapath)
    link_py(os.path.join(source, "applications", application))
    write_ok(application, all_modules,
             unfound_modules,
        tools.get_dependent_dependencies(all_modules, dependencies, datapath),
        unfound_dependencies)
示例#2
0
def setup_application(application, source, datapath, apps):
    print "Configuring application", application, "...",
    data = tools.get_application_description(source, application, datapath)
    for d in data["required_dependencies"]:
        if not tools.get_dependency_info(d, datapath)["ok"]:
            write_no_ok(application)
            # exits
    dependencies = data["required_dependencies"]
    unfound_dependencies = []
    for d in data["optional_dependencies"]:
        if tools.get_dependency_info(d, datapath)["ok"]:
            dependencies.append(d)
        else:
            unfound_dependencies.append(d)
    for d in data["required_modules"]:
        if not tools.get_module_info(d, datapath)["ok"]:
            write_no_ok(application)
            # exits
    modules = data["required_modules"]
    unfound_modules = []
    for d in data["optional_modules"]:
        if tools.get_module_info(d, datapath)["ok"]:
            modules.append(d)
        else:
            unfound_modules.append(d)
    all_modules = tools.get_dependent_modules(modules, datapath)
    link_py_apps(os.path.join(source, "applications", application))
    make_doxygen(application, source, all_modules)
    make_overview(application, source, apps)
    write_ok(
        application, all_modules, unfound_modules,
        tools.get_dependent_dependencies(all_modules, dependencies, datapath),
        unfound_dependencies)
示例#3
0
def setup_module(module, source, datapath):
    sys.stdout.write("Configuring module %s ..." % module)
    data = tools.get_module_description(source, module, datapath)
    for d in data["required_dependencies"]:
        if not tools.get_dependency_info(d, datapath)["ok"]:
            print("Required dependency %s not found" % d)
            write_no_ok(module)
            return False, []
    dependencies = data["required_dependencies"]
    unfound_dependencies = []
    for d in data["optional_dependencies"]:
        if tools.get_dependency_info(d, datapath)["ok"]:
            dependencies.append(d)
        else:
            unfound_dependencies.append(d)
    for d in data["required_modules"]:
        if not tools.get_module_info(d, datapath)["ok"]:
            print("Required module IMP.%s not available" % d)
            write_no_ok(module)
            return False, []
    modules = data["required_modules"]
    unfound_modules = []
    for d in data["optional_modules"]:
        if tools.get_module_info(d, datapath)["ok"]:
            modules.append(d)
        else:
            unfound_modules.append(d)
    all_modules = tools.get_dependent_modules(modules, datapath)
    moddir = os.path.join('IMP', '' if module == 'kernel' else module)
    swig_includes = [os.path.split(x)[1]
                     for x in tools.get_glob(
                         [os.path.join(source, "modules", module, "pyext",
                                       "include", "*.i")])] \
                    + [os.path.join(moddir, os.path.split(x)[1])
                       for x in tools.get_glob(
                           [os.path.join("include", moddir, "*_macros.h")])]
    swig_wrapper_includes = [os.path.join(moddir, "internal",
                                          os.path.split(x)[1])
                             for x in tools.get_glob(
                                 [os.path.join(source, "modules", module,
                                               "include", "internal",
                                               "swig*.h")])]
    tools.mkdir(os.path.join("src", module))
    tools.mkdir(os.path.join("src", module + "_swig"))
    write_ok(module, all_modules, unfound_modules,
             tools.get_dependent_dependencies(all_modules, dependencies,
                                              datapath),
             unfound_dependencies, swig_includes, swig_wrapper_includes)
    return True, all_modules
示例#4
0
def setup_module(module, source, datapath):
    sys.stdout.write("Configuring module %s ..." % module)
    data = tools.get_module_description(source, module, datapath)
    for d in data["required_dependencies"]:
        if not tools.get_dependency_info(d, datapath)["ok"]:
            print("Required dependency %s not found" % d)
            write_no_ok(module)
            return False, []
    dependencies = data["required_dependencies"]
    unfound_dependencies = []
    for d in data["optional_dependencies"]:
        if tools.get_dependency_info(d, datapath)["ok"]:
            dependencies.append(d)
        else:
            unfound_dependencies.append(d)
    for d in data["required_modules"]:
        if not tools.get_module_info(d, datapath)["ok"]:
            print("Required module IMP.%s not available" % d)
            write_no_ok(module)
            return False, []
    modules = data["required_modules"]
    unfound_modules = []
    for d in data["optional_modules"]:
        if tools.get_module_info(d, datapath)["ok"]:
            modules.append(d)
        else:
            unfound_modules.append(d)
    all_modules = tools.get_dependent_modules(modules, datapath)
    moddir = os.path.join('IMP', '' if module == 'kernel' else module)
    swig_includes = [os.path.split(x)[1] for x
                     in tools.get_glob([os.path.join(source, "modules", module,
                                                     "pyext", "include", "*.i")])]\
        + [os.path.join(moddir, os.path.split(x)[1]) for x
           in tools.get_glob([os.path.join("include", moddir, "*_macros.h")])]
    swig_wrapper_includes = [os.path.join(moddir, "internal", os.path.split(x)[1]) for x
                             in tools.get_glob([os.path.join(source, "modules", module, "include", "internal", "swig*.h")])]
    tools.mkdir(os.path.join("src", module))
    tools.mkdir(os.path.join("src", module + "_swig"))
    write_ok(module, all_modules,
             unfound_modules, tools.get_dependent_dependencies(
                 all_modules, dependencies, datapath),
             unfound_dependencies, swig_includes, swig_wrapper_includes)
    return True, all_modules
示例#5
0
def setup_module(module, source, datapath):
    print "Configuring module", module, "...",
    data = tools.get_module_description(source, module, datapath)
    for d in data["required_dependencies"]:
        if not tools.get_dependency_info(d, datapath)["ok"]:
            print d, "not found"
            write_no_ok(module)
            return False, []
    dependencies = data["required_dependencies"]
    unfound_dependencies = []
    for d in data["optional_dependencies"]:
        if tools.get_dependency_info(d, datapath)["ok"]:
            dependencies.append(d)
        else:
            unfound_dependencies.append(d)
    for d in data["required_modules"]:
        if not tools.get_module_info(d, datapath)["ok"]:
            print "IMP." + d, "not found"
            write_no_ok(module)
            return False, []
    modules = data["required_modules"]
    unfound_modules = []
    for d in data["optional_modules"]:
        if tools.get_module_info(d, datapath)["ok"]:
            modules.append(d)
        else:
            unfound_modules.append(d)
    all_modules = tools.get_dependent_modules(modules, datapath)
    swig_includes = [os.path.split(x)[1] for x
                     in tools.get_glob([os.path.join(source, "modules", module,
                                                     "pyext", "include", "*.i")])]\
        + ["IMP/" + module + "/" + os.path.split(x)[1] for x
           in tools.get_glob([os.path.join("include", "IMP", module, "*_macros.h")])]
    swig_wrapper_includes = ["IMP/" + module + "/internal/" + os.path.split(x)[1] for x
                             in tools.get_glob([os.path.join(source, "modules", module, "include", "internal", "swig*.h")])]
    tools.mkdir(os.path.join("src", module))
    tools.mkdir(os.path.join("src", module + "_swig"))
    write_ok(module, all_modules,
             unfound_modules, tools.get_dependent_dependencies(
                 all_modules, dependencies, datapath),
             unfound_dependencies, swig_includes, swig_wrapper_includes)
    return True, all_modules
示例#6
0
def setup_module(module, source, datapath):
    print "Configuring module", module, "...",
    data= tools.get_module_description(source, module, datapath)
    for d in data["required_dependencies"]:
        if not tools.get_dependency_info(d, datapath)["ok"]:
            print d, "not found"
            write_no_ok(module)
            return False
    dependencies = data["required_dependencies"]
    unfound_dependencies = []
    for d in data["optional_dependencies"]:
        if tools.get_dependency_info(d, datapath)["ok"]:
            dependencies.append(d)
        else:
            unfound_dependencies.append(d)
    for d in data["required_modules"]:
        if not tools.get_module_info(d, datapath)["ok"]:
            print "IMP."+d, "not found"
            write_no_ok(module)
            return False
    modules= data["required_modules"]
    unfound_modules = []
    for d in data["optional_modules"]:
        if tools.get_module_info(d, datapath)["ok"]:
            modules.append(d)
        else:
            unfound_modules.append(d)
    all_modules=tools.get_dependent_modules(modules, datapath)
    swig_includes=[os.path.split(x)[1] for x
                   in tools.get_glob([os.path.join(source, "modules", module,
                                                   "pyext", "include", "*.i")])]\
                 + ["IMP/"+module+"/"+os.path.split(x)[1] for x
                            in tools.get_glob([os.path.join("include", "IMP", module, "*_macros.h")])]
    swig_wrapper_includes= ["IMP/"+module+"/internal/"+os.path.split(x)[1] for x
                   in tools.get_glob([os.path.join(source, "modules", module, "include", "internal", "swig*.h")])]
    tools.mkdir(os.path.join("src", module))
    tools.mkdir(os.path.join("src", module+"_swig"))
    write_ok(module, all_modules,
             unfound_modules, tools.get_dependent_dependencies(all_modules, dependencies,datapath),
             unfound_dependencies, swig_includes, swig_wrapper_includes)
    return True