[oe] How do I install python modules for use within recipes?

Gary Thomas gary at mlbassoc.com
Fri Apr 8 01:41:53 UTC 2011


On 04/07/2011 07:24 PM, Charles Manning wrote:
> On Fri, Apr 8, 2011 at 1:00 PM, Gary Thomas<gary at mlbassoc.com>  wrote:
>> On 04/07/2011 06:53 PM, Charles Manning wrote:
>>>
>>> Thanks
>>>
>>> What's the story with
>>> org.openembedded.dev/contrib/python/generate-manifest*
>>>
>>> Do I have to modify that?
>>
>> No, that's for the internal Python modules.
>>
>> n.b. don't top post :-)
>>
>
> Sorry I don't usually use gmail web interface...
>
> So by Internal Python modules what do you mean? If that's just the
> stuff used in cranking bitbake and OE then why does it need to
> generate the manifest in the recipes?

When you build the generic Python [interpreter], it has lots of [mostly
small] packages that come along for the ride.  This manifest tool is used
to split those into manageable packages so you don't end up installing
the world (and many MB of code) if you don't need it.

>
> Building some python modules from scratch looks ugly. Is there
> anything stopping me from just using easy-install? ... Or would that
> be even harder? Seems odd that native recipes don't use easy-install
> unless there is a good reason not to.

I haven't tried it, but if you're lucky you can just add these lines
to the python-lxml recipe:
   BBCLASSEXTEND = "native"
   NATIVE_INSTALL_WORKS = "1"
Then try to build python-lxml-native.  If that doesn't work, then there will
be more effort to do.

>>> On Fri, Apr 8, 2011 at 12:07 PM, Robert Foerster<robert at erafx.com>    wrote:
>>>>
>>>> On Thu, Apr 7, 2011 at 7:51 PM, Charles
>>>> Manning<cdhmanning at gmail.com>wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I have a project which uses python as part of the building process to
>>>>> generate some C code from some XML which is then later compiled.
>>>>>
>>>>> The python script uses the python lxml module.
>>>>>
>>>>> My recipe has a do_compile as follows:
>>>>>
>>>>> do_compile() {
>>>>>         cd ${S}/
>>>>>         make -f Gencode.mk
>>>>>         make
>>>>> }
>>>>>
>>>>> During the make -f Gencode.mk, the python script which imports lxml
>>>>> fails to do so and fails.
>>>>>
>>>>> Question: How do I instruct OE to set up the lxml module and make it
>>>>> available here?
>>>>>
>>>>>
>>>> I don't see a recipe for python-lxml-native, so you'll likely have to
>>>> make
>>>> one (and then make your recipe depend on it to ensure it's built and
>>>> available).
>>>>
>>>> There are several other python-*-native modules in OE, take a look at
>>>> what
>>>> they're doing.
>>>> http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/python
>>>>
>>>>
>>>>
>>>>
>>>>> Thanks
>>>>>
>>>>> Charles
>>>>>
>>>>> _______________________________________________
>>>>> Openembedded-devel mailing list
>>>>> Openembedded-devel at lists.openembedded.org
>>>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>>>>
>>>> _______________________________________________
>>>> Openembedded-devel mailing list
>>>> Openembedded-devel at lists.openembedded.org
>>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>>>
>>>
>>> _______________________________________________
>>> Openembedded-devel mailing list
>>> Openembedded-devel at lists.openembedded.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>
>> --
>> ------------------------------------------------------------
>> Gary Thomas                 |  Consulting for the
>> MLB Associates              |    Embedded world
>> ------------------------------------------------------------
>>

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




More information about the Openembedded-devel mailing list