[yocto] BKM for Importing Python Modules
Burton, Ross
ross.burton at intel.com
Thu Nov 30 08:47:55 PST 2017
On 30 November 2017 at 16:42, <Aaron_Wright at selinc.com> wrote:
> "Burton, Ross" <ross.burton at intel.com> wrote on 11/30/2017 02:47:43 AM:
> > Python functions in classes are executed by the Python that is
> > executing bitbake, which doesn't have access to the modules in the
> > native sysroot (and won't, as any compiled modules in there are
> > linked against the native python, not the host python).
>
> So adding to sys.path works, but only accidentially?
>
> sys.path.append(
> d.getVar("STAGING_DIR_NATIVE", True) +
> d.getVar("PYTHON_SITEPACKAGES_DIR", True))
>
It only works because there are currently no binary modules in there that
don't cause the interpreter to crash...
Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20171130/0e624af3/attachment.html>
More information about the yocto
mailing list