当前位置: 首页>>代码示例>>Python>>正文


Python Env.check_env_wrt_manifest方法代码示例

本文整理汇总了Python中env.Env.check_env_wrt_manifest方法的典型用法代码示例。如果您正苦于以下问题:Python Env.check_env_wrt_manifest方法的具体用法?Python Env.check_env_wrt_manifest怎么用?Python Env.check_env_wrt_manifest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在env.Env的用法示例。


在下文中一共展示了Env.check_env_wrt_manifest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from env import Env [as 别名]
# 或者: from env.Env import check_env_wrt_manifest [as 别名]

#.........这里部分代码省略.........
    logging.basicConfig(format=colored("%(levelname)s", "yellow") + colored("\t%(filename)s:%(lineno)d: %(funcName)s()\t", "blue") + "%(message)s", level=numeric_level)
    logging.debug(str(options))

    modules_pool = ModulePool()
    modules_pool.new_module(parent=None,
                            url=os.getcwd(),
                            source=fetch_mod.LOCAL,
                            fetchto=".",
                            process_manifest=False)

    # Setting top_module as top module of design (ModulePool class)
    if modules_pool.get_top_module().manifest is None:
        logging.info("No manifest found. At least an empty one is needed")
        logging.info("To see some help, type hdlmake --help")
        sys.exit("Exiting")

    # Setting global variable (global_mod.py)
    top_mod = modules_pool.get_top_module()
    global_mod.top_module = top_mod

    global_mod.global_target = global_mod.top_module.target
    global_mod.mod_pool = modules_pool

    # if options.command == "version":
    #     print("Hdlmake build " + BUILD_ID)
    #     quit()

    if options.command == "check-manifest":
        env.check_manifest(modules_pool.get_top_module().manifest, verbose=True)

    modules_pool.process_top_module_manifest()

    env.top_module = modules_pool.get_top_module()
    env.check_env(verbose=False)
    env.check_env_wrt_manifest(verbose=False)

    if options.command == "auto":
        logging.info("Running automatic flow.")
        if not top_mod.action:
            logging.error("`action' manifest variable has to be specified. "
                          "Otherwise hdlmake doesn't know how to handle the project")
            quit()
        if top_mod.action == "simulation":
            sim = GenerateSimulationMakefile(modules_pool=modules_pool,
                                             options=options,
                                             env=env)
            sim.run()
            quit()
        elif top_mod.action == "synthesis":
            syn = GenerateISEMakefile(modules_pool=modules_pool,
                                      options=options,
                                      env=env)
            ise = GenerateISEProject(modules_pool=modules_pool,
                                     options=options,
                                     env=env)
            remote = GenerateRemoteSynthesisMakefile(modules_pool=modules_pool,
                                                     options=options,
                                                     env=env)
            syn.run()
            ise.run()
            remote.run()
            quit()

    if options.command == "manifest-help":
        ManifestParser().print_help()
        quit()
    elif options.command == "make-simulation":
        action = GenerateSimulationMakefile
    elif options.command == "make-fetch":
        action = GenerateFetchMakefile
    elif options.command == "make-ise":
        action = GenerateISEMakefile
    elif options.command == "make-remote":
        action = GenerateRemoteSynthesisMakefile
    elif options.command == "fetch":
        action = FetchModules
    elif options.command == "ise-project":
        action = GenerateISEProject
    elif options.command == "clean":
        action = CleanModules
    elif options.command == "list-mods":
        action = ListModules
    elif options.command == "list-files":
        action = ListFiles
    elif options.command == "merge-cores":
        action = MergeCores
    elif options.command == "quartus-project":
        action = GenerateQuartusProject

    action_instance = action(modules_pool=modules_pool,
                             options=options,
                             env=env)

    try:
        action_instance.run()
    except Exception as e:
        import traceback
        logging.error(e)
        print("Trace:")
        traceback.print_exc()
开发者ID:NickeZ,项目名称:hdl-make,代码行数:104,代码来源:__main__.py


注:本文中的env.Env.check_env_wrt_manifest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。