colleague recently asked how to list the built-in/core modules that come with just installing python3, to know which additional python3 modules would require running around looking for actual recipes, all of this without having to boot the actual image. had to think about this for a second, and came up with this -- open to suggestions, criticism or gales of wild laughter.
as a working example to demonstrate this, i'm building a core-image-minimal for qemux86_64 (with "package_rpm"), so i can use that as a starting point, and i want to identify the python modules that go into the image without having to boot the image -- that is, just based on what i can poke at under tmp/deploy/. so, after building a core-image-minimal, i simply: IMAGE_INSTALL_append = " python3" build again, and start looking around to see what that added. first, i can check the image manifest, where i can see a pile of python3 stuff that will now be part of the image: python3-2to3 core2_64 3.8.2 python3-asyncio core2_64 3.8.2 python3-audio core2_64 3.8.2 python3-codecs core2_64 3.8.2 python3-compile core2_64 3.8.2 python3-compression core2_64 3.8.2 python3-core core2_64 3.8.2 python3-crypt core2_64 3.8.2 ... and so on and so on ... starting with the python3-core package, i can list the built-in modules via: $ rpm2cpio python3-core-3.8.2-r0.core2_64.rpm | cpio -itv where i can get an idea of the built-in modules: ... ./usr/lib/python3.8/linecache.py ./usr/lib/python3.8/locale.py ./usr/lib/python3.8/lzma.py ./usr/lib/python3.8/ntpath.py ./usr/lib/python3.8/opcode.py ./usr/lib/python3.8/operator.py ./usr/lib/python3.8/optparse.py ./usr/lib/python3.8/os.py ... is that the right/easiest way to see the built-in modules? is there a simpler way? would that be a complete list or would i be missing something? and second, the manifest (as seen above) would also list the packages for the various python core modules, as in: ... python3-email core2_64 3.8.2 python3-fcntl core2_64 3.8.2 python3-html core2_64 3.8.2 python3-idle core2_64 3.8.2 python3-image core2_64 3.8.2 python3-io core2_64 3.8.2 python3-json core2_64 3.8.2 python3-logging core2_64 3.8.2 ... at this point, would this be a comprehensive list of the modules that would be installed by having done nothing but installed "python3"? am i missing any? the point of this is to clarify what's there to know if one then has to look externally for a given module to be added. thanks for any pointers. rday
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#49353): https://lists.yoctoproject.org/g/yocto/message/49353 Mute This Topic: https://lists.yoctoproject.org/mt/74056463/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
