| Summary: | Stop using python distutils | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Khem Raj <raj.khem> |
| Component: | core | Assignee: | Tim Orling <tim.orling> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | meta.mr.watcher, meta.watcher, randy.macleod, TicoTimo, tvgamblin |
| Version: | unspecified | ||
| Target Milestone: | 4.0 M2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
Khem Raj
2021-10-22 12:37:59 UTC
Start by moving the distutils class from oe-core to meta-python? (1) Expand setuptools3 class to do the bits that it inherits from distutils classes as a start. (2) Build oe-core python modules without distutils and see if there are any problems. (3) Build meta-python and see the same. (4) As a stop gap, move distutils classes to meta-python. Eventually, we will most likely have to figure out a way of using wheels. Some packaging is not even using setuptools anymore and that trend is likely to increase. waf.bbclass and sanity.bbclass both import distutils, so it is not only the python3 module building infrastructure (distutils*.bbclass) that needs to change. Other upstream things like glib-2.0, gpgme and bind also import or use methods from distutils. Porting from Distutils: https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html PEP 632 -- Deprecate distutils module: https://www.python.org/dev/peps/pep-0632/ Packaging and distributing projects: https://packaging.python.org/guides/distributing-packages-using-setuptools/ Things in scripts/ also need to change: wic, buildhistory-diff, recipetool RFC series sent to oe-core list: https://lore.kernel.org/openembedded-core/cover.1637900380.git.timothy.t.orling@intel.com/T/#t Import distutils.version to lib/bb/version https://lore.kernel.org/bitbake-devel/20211126051800.2364615-1-timothy.t.orling@intel.com/T/#u This is a standalone with implementations of LooseVersion and StrictVersion which are not replicated elsewhere. Series updated: https://git.yoctoproject.org/poky-contrib/log/?h=timo/deprecate_distutils_14610_v2 And merged: (beginning with) https://git.yoctoproject.org/poky/commit/?id=5e36659ee314fdde2a357fa40a2109a9ebc7530d Docs changes are in review. Docs changes are merged as are the fixes to meta-openembedded (and meta-python2). It takes a village :) |