[yocto] How does python-native work?

Gary Thomas gary at mlbassoc.com
Wed Apr 23 07:15:15 PDT 2014


How is python-native supposed to work?  I can see that it's
built and installed in my tmp/sysroots/HOST but it's installed
in a sub-directory which is not found by normal means.

In particular, I'm trying to build a package which uses configure
to discover python support and if present package a python interface
library.  In the config.log, I see this:
   configure:12109: checking for python
   configure:12127: found /usr/bin/python
   configure:12140: result: /usr/bin/python
which only makes sense since there is no python in my sysroots (directly).
   $ find tmp/sysroots/x86_64-linux/usr/bin -name "python*"
   tmp/sysroots/x86_64-linux/usr/bin/python-native
   tmp/sysroots/x86_64-linux/usr/bin/python-native/python-config
   tmp/sysroots/x86_64-linux/usr/bin/python-native/python2
   tmp/sysroots/x86_64-linux/usr/bin/python-native/python2-config
   tmp/sysroots/x86_64-linux/usr/bin/python-native/python2.7-config
   tmp/sysroots/x86_64-linux/usr/bin/python-native/python
   tmp/sysroots/x86_64-linux/usr/bin/python-native/python2.7

Even if I convince configure where to find python, e.g. adding
   --with-python=$OECORE_NATIVE_SYSROOT/usr/bin/python-native/python
   --with-python-config=$OECORE_NATIVE_SYSROOT/usr/bin/python-native/python-config
this still isn't right since python-config gives incorrect answers:
   $ tmp/sysroots/x86_64-linux/usr/bin/python-native/python-config --includes
   -I/usr/include/python2.7 -I/usr/include/python2.7

I would think that python-native would install python on my path
(from tmp/sysroots) and as well provide python-config which gives
the answers I can use, e.g. --includes which point to the python
includes in tmp/sysroots/HOST, etc.

What am I missing and how do I work with this?

Thanks

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------



More information about the yocto mailing list