Bug 9212 - rework oe-core's handling of python and sysroots
Summary: rework oe-core's handling of python and sysroots
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2
Assignee: Alexander Kanavin
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-03-04 10:44 UTC by Alexander Kanavin
Modified: 2016-07-04 10:03 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kanavin 2016-03-04 10:44:19 UTC
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.
Comment 1 Alexander Kanavin 2016-06-16 14:28:24 UTC
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.
Comment 2 Alexander Kanavin 2016-06-22 12:10:47 UTC
Patch that moves staging_inc/libdir to python(3)native.bbclass submitted.
Comment 3 Alexander Kanavin 2016-07-04 10:03:31 UTC
Patch merged.