[英]yocto bitbake: running bitbake python task with python command line options
Is there a way to run bitbake task with python command line options ? 有没有一种方法可以使用python命令行选项运行bitbake任务? Example: I have debug in the code, and the debug is always True, is there a way to pass an python option like python -O when executing bitbake task.
例如:我在代码调试和调试始终是真实的,有没有办法bitbake的执行任务时传似蟒-O的蟒蛇选项。
python do_some_task(){
if __debug__:
print("...")
...
}
addtask do_some_task
I'm running my task's in the following way: 我以以下方式运行任务:
bitbake -c some_task ...
No. Python tasks are eval/exec by the worker directly, not by spawning a new instance of python. 否。Python任务是由工作人员直接执行eval / exec的,而不是通过生成新的python实例来执行。
For debugging can't you just use bb.debug() and read the task logs, which is where debug output goes? 对于调试,您不能只使用bb.debug()并读取任务日志,调试输出在哪里?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.