[yocto] Missing Python modules on target

Erik Botö erik.boto at pelagicore.com
Thu Mar 20 05:22:46 PDT 2014


Hi Jonatan,

I believe it should be in python-misc package, so if you add that to
IMAGE_INSTALLS or as a RDEPEND of some other installed packaged it
should work.

There's a section in python_2.7.3.bb which is a catch all for stuff
not packaged by python-2.7-manifest:

# catch all the rest (unsorted)
PACKAGES += "${PN}-misc"
FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"

Cheers,
Erik

On Wed, Mar 19, 2014 at 11:35 PM, Jonatan Magnusson
<jonatan.magnusson at gmail.com> wrote:
>
> (I replied to Chris personal email by mistake. Our conversation is pasted
> below.)
>
> I tried to investigate how the Python installer works, and there are still
> many parts I am not sure about.
> But as far as I understand the manifest file (python-2.7-manifest.inc) *is*
> responsible for telling bitbake which Python modules to install. It contains
> a bunch of FILES_${PN}-<package> definitions like this:
>
> FILES_${PN}-numbers="${libdir}/python2.7/decimal.*
> ${libdir}/python2.7/numbers.* "
>
> If I add "${libdir}/python2.7/wsgiref" to one of these and rebuild the image
> the module gets installed on the image.  This solves my problem, but I
> wonder why it is not included by default?
>
> Anyone who can shed som light on this?
>
> Regards,
> Jonatan Magnusson
>
>
> 2014-03-19 17:12 GMT+01:00 Chris Larson <clarson at kergoth.com>:
>>
>>
>> On Wed, Mar 19, 2014 at 9:09 AM, Jonatan Magnusson
>> <jonatan.magnusson at gmail.com> wrote:
>>>
>>>
>>> As far as I can see the manifest file is generated from
>>> "scripts/contrib/python/generate-manifest-2.7.py" and "wsgiref" is not
>>> mentioned in that file either.
>>>
>>> There is nothing really to build in wsgiref. It's just a directory of .py
>>> files that should be copied to the image. And those files are also present
>>> in
>>>
>>> "build/tmp-eglibc/work/i586-oe-linux/python/2.7.3-r0.3/image/usr/lib/python2.7".
>>
>>
>> If the wsgiref modules got installed by the python buildsystem in
>> do_install, but the manifest didn't include it,l then we'd get warnings
>> about unpackaged files. As we do not, it's not being installed for some
>> reason, which leads me to believe that the upstream python buildsystem isn't
>> installing it, as it's not enabled, but I'm not an expert on the python
>> buildsystem. That's where I'd suggest looking. Check the python recipe's
>> do_install, and then examine the python buildsystem to see how to verify
>> that wsgiref is enabled for inclusion.
>>
>>
>>> Also, the manifest generation script above links to this page:
>>>
>>> http://www.vanille-media.de/site/index.php/projects/python-for-arm-linux/
>>>
>>> ... which links to ...
>>>
>>> http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/python
>>>
>>> ... which has a "python-wsgiref_0.1.2.bb" file that is not included in
>>> Yocto it seems. I'm just getting started with Yocto, so I may get something
>>> wrong, but it
>>> seems that perhaps some more python .bb-files should be transferred to
>>> Yocto?
>>
>>
>>
>> It seems like that recipe is for a standalone pypi wsgiref, but it's
>> included in python for 2.5+, I expect that recipe is a remnant of pre-2.5
>> python builds.
>> --
>> Christopher Larson
>> clarson at kergoth dot com
>> Founder - BitBake, OpenEmbedded, OpenZaurus
>> Maintainer - Tslib
>> Senior Software Engineer, Mentor Graphics
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



-- 
=============================================
Erik Botö
Senior Software Engineer
Pelagicore AB
Ekelundsgatan 4, 6tr, SE-411 18 Gothenburg, Sweden
Mobile: +46 (0)76 881 72 03
E-Mail: erik.boto at pelagicore.com
=============================================



More information about the yocto mailing list