[yocto] Calling python function from shell function
Christopher Larson
clarson at kergoth.com
Sat Nov 7 10:04:16 PST 2015
On Sat, Nov 7, 2015 at 10:27 AM, Vuille, Martin (Martin) <vmartin at avaya.com>
wrote:
> In my custom .bbclass, I have a python function
>
>
>
> python whatever () {
>
> …
>
> }
>
>
>
> and I would like to call it from a shell function
>
>
>
> do_something () {
>
> …
>
> whatever
>
> …
>
> }
>
>
>
> but bitbake gives me an error “whatever: not found” when building
>
> recipes based on this class
>
>
>
> Is what I am trying to do possible? Do I have the syntax wrong?
>
Not doable, no. You could make a python do_something which calls both
`whatever` and your shell `something_shell`, though. i.e.
python whatever () {
pass
}
do_something_shell () {
:
}
python do_something () {
bb.build.exec_func("whatever", d)
bb.build.exec_func("something_shell", d)
}
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20151107/8199fe0e/attachment.html>
More information about the yocto
mailing list