[oe] Use python in variable assigment of a recipe

Phil Blundell philb at gnu.org
Tue Feb 28 13:33:50 UTC 2012


On Tue, 2012-02-28 at 13:11 +0100, Steffen Sledz wrote:
> Because i'm working with oe-classic i tried this (found in some other examples):
> 
>   MYVAR = "${@my_func()}"
> 
>   def my_func():
>       bbpath = os.path.dirname(bb.data.getVar('FILE',d,1))
>       ...
> 
> But this leads to an error:
> 
>   NameError: global name 'd' is not defined
> 
> :(

MYVAR = "${@my_func(d)}"

def my_func(d):
   ...

p.







More information about the Openembedded-devel mailing list