[OE-core] python distutils configuration broken?

Phil Blundell philb at gnu.org
Tue Dec 13 12:58:57 UTC 2011


Is anybody successfully using distutils from python-native with oe-core
at the moment?  It seems to be rather broken as far as I can tell.

The patch 12-distutils-prefix-is-inside-staging-area.patch does some
stuff like:

+PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
+EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )

[...]

+        if plat_specific:
+            prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
+        else:
+            prefix = plat_specific and EXEC_PREFIX or PREFIX

Firstly, this all goes rather wrong if BUILD_SYS et al aren't exported
(which they aren't by default).  But even after adding the appropriate
exports to my recipe, it ends up looking in the wrong place for the
headers: it synthesizes a path along the lines of
tmp/sysroots/${HOST_SYS}/include, which is wrong since the target
sysroots are namespaced by MACHINE.

Replacing the latter piece of code above with just:

        prefix = os.environ['STAGING_INCDIR'].rstrip('include')

seems to improve the situation for me.  As far as I can tell the
"plat_specific" distinction is useless here since oe-core installs all
the header files into the same place.

Can any python experts comment on this?

thanks

p.






More information about the Openembedded-core mailing list