Please remember to send to the list.

On 26 March 2018 at 22:16, Ulf Samuelsson <yo...@emagii.com> wrote:
> I do not see however why "inherit pythonnative" would make python-restkit
> importable. Why is that?
>
> My python script start with
> #!/usr/bin/python
>
> Does that mean that I use host python, instead of native python?
> $bindir_native is "/usr/bin", so what is the difference?

python-restkit-native installs the modules into
/whatever/your/tmp/dir/is/sysroot/usr/lib/python/site-packages/restkit.
The host Python doesn't know to look in there, and if the module was
built from C sources the chances are the ABI doesn't match anyway.
You need to run the nativepython in the sysroot which 1) matches API
2) knows to look in the sysroot for modules.

This is why 1) you need to either inherit pythonnative (in a recipe)
or 2) run the right Python explicitly.  *Any* python code using
/usr/bin/python explicitly is broken, the best practise everywhere
(not just in Yocto) is to use #! /usr/bin/env python as you can't
assume the one in /usr/bin is the right one.

Ross
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to