Skip to contentSkip to conversation

Include additional python modules...

DISCUSSION Ahmed El-Madhoun (aelmadho) 1 participant 1 message Nov 18, 2015

lore
Share & tools
lore
#0 lore raw

Hi All,

I am wondering if anything special needs to be done to provide additional python packages in python functions within recipes, for instance, in an image.bbclass extension, I have the following python function:

python do_write_yaml() {

Import yaml

}

This fails indicating no such module, but when I use devshell, the os.sys.path seems to include the right path for native sysroot, and I have my "DEPENDS += python-pyyaml-native", however, within the python functions in the recipes, it is not able to see the pyyaml package, do I need to add the path manually to os.sys.path? For instance, how is "bb" and "oe" are always included in the PATH, and how do we make other python packages available in the path for extending existing functionality through python modules?

Any help is greatly appreciated.

Thanks,
Ahmed