Current support for python and sysroots and target build utilizing native python to run scripts was written long time ago, isn't designed well and no one really understands it. It also contains incorrect code, such as: http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch#n15 (HOST_SYS does not necessarily map directly to sysroot name). We need to re-do it so that it's clean, simple and as free of side effects as possible.
I have fixed the HOST_SYS issue in 4977a0743ba439a46716c6ef10c5958d5a561115. After looking at this a bit closer (as a part of moving recipes to use python 3 where possible), I still don't have a clear idea how the redesign could look like. There is a million ways that software determines what the 'system' Python is, and there is no single way to take care of them all. Also, determining the system directories through patching distutils to use STAGING_INCDIR/STAGING_LIBDIR when building for target is not a bad approach, and I don't know how to replace it with something better. One incremental improvement is no longer force recipes to export these variables - the python(3)native class should take care of it.
Patch that moves staging_inc/libdir to python(3)native.bbclass submitted.
Patch merged.