Bug 16019 - Review python standard library splitting
Summary: Review python standard library splitting
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 5.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.1
Assignee: Trevor Gamblin
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 15977
  Show dependency tree
 
Reported: 2025-10-17 16:41 UTC by Ross Burton
Modified: 2026-03-26 15:13 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2025-10-17 16:41:49 UTC
I think the current python standard library splitting is too split up and results in either overcomplicated dependencies, or broken python.

For example, currently importlib.metadata is part of python3-core but it should depend on python3-email and python3-zipfile (see https://bugzilla.yoctoproject.org/show_bug.cgi?id=15977). Thus, a package that is in core isn't usable without further dependencies.

I believe we should revisit the splitting and see if we can bundle more into the 'core' package without increasing the size too much, meaning more packages will be able to depend on just core unless they use rarer parts of the standard library.

In prior art, Debian has python3-minimal which is a subset of the standard library and python3-stdlib which depends on -minimal and provides the rest of the standard library.

https://packages.debian.org/sid/libpython3.13-minimal (~5MB)
https://packages.debian.org/sid/libpython3.13-stdlib (~10MB)

Their tooling to produce this split is https://salsa.debian.org/cpython-team/python3/-/blob/python3.13/debian/pymindeps.py