[yocto] yocto Digest, Vol 50, Issue 54

Gary Thomas gary at mlbassoc.com
Fri Nov 14 11:04:23 PST 2014


On 2014-11-14 11:52, Edward Wingate wrote:
> On Fri, Nov 14, 2014 at 9:39 AM, <yocto-request at yoctoproject.org <mailto:yocto-request at yoctoproject.org>> wrote:
>
>     From: Gary Thomas <gary at mlbassoc.com <mailto:gary at mlbassoc.com>>
>
>     On 2014-11-14 10:10, Edward Wingate wrote:
>     >
>     > The ramdisk image ballooned to 22MB though.  It's expected, but due to
>
>      > flash size constraints, Python may not be an option in this case.
>
>     You can always just bring in the packages you need (python-modules is a
>     pretty heavy hammer!)  Python is split into ~90 separate packages, each
>     with a [small] set of modules/functionality.
>
>
> I would really like to try this. How do I find out what the various python packages are and what's in each package?  I tried
> http://layers.openembedded.org/layerindex/branch/master/recipes/, but don't find what I'm looking for (right now, Python's built-in logging and codecs modules).

Try looking in your build tree.  Depending on your target configuration,
you'll have either RPM or IPK packages and the python modules end up in
the architecture dependent collection.  For example, on my i.MX6 (ARM)
target, I have:
   $ ls tmp/deploy/ipk/cortexa7hf-vfp-neon/python*
   tmp/deploy/ipk/cortexa7hf-vfp-neon/python-2to3_2.7.3-r0.3.0_cortexa7hf-vfp-neon.ipk
   tmp/deploy/ipk/cortexa7hf-vfp-neon/python-audio_2.7.3-r0.3.0_cortexa7hf-vfp-neon.ipk
   tmp/deploy/ipk/cortexa7hf-vfp-neon/python-bsddb_2.7.3-r0.3.0_cortexa7hf-vfp-neon.ipk
   tmp/deploy/ipk/cortexa7hf-vfp-neon/python-codecs_2.7.3-r0.3.0_cortexa7hf-vfp-neon.ipk
   tmp/deploy/ipk/cortexa7hf-vfp-neon/python-compile_2.7.3-r0.3.0_cortexa7hf-vfp-neon.ipk
     ...

It can get a bit tricky to decide which package contains the module(s) you need
as many of them are grouped together.  If you know the name of the module, you
can typically find it via a quick search, e.g. to find the package that contains
the htmllib module:
   $ find tmp/work/cortexa7hf-vfp-neon-amltd-linux-gnueabi/python/2.7.3-r0.3/packages-split/ -name htmllib.py
   tmp/work/cortexa7hf-vfp-neon-amltd-linux-gnueabi/python/2.7.3-r0.3/packages-split/python-html/usr/lib/python2.7/htmllib.py
so, in this case I'm looking for the 'python-html' package.

Once you determine the package name, just add that to your image (or if you
have things set up for package updates, you can just add the packages directly
on your board).

>
> I also can't find where the python-modules recipe is located.  I thought that might give me a clue as to what all the modules are and where they are.  I would think python-modules
> would be located in or poky/meta/recipes-devtools/python or meta-openembedded/meta-python where it seems all the other python stuff are, but it's not there that I can see.  Where
> is python-core defined, for that matter?  I can't find that anywhere either.  All references to python-core and python-modules are in the build/tmp directory, but I don't see the
> source definition.

Everything comes from just the single 'python' recipe (lots
of magic lives within)

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



More information about the yocto mailing list