On 11/24/21 8:19 PM, Tim Orling wrote:
As most of you are now aware, Python 3.10 deprecated the use of distutils, with removal in 3.12 (~Octover 2023).

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14610 <https://bugzilla.yoctoproject.org/show_bug.cgi?id=14610>

I have begun a branch to deprecate distutils (and basically remove it's usage from oe-core). https://git.yoctoproject.org/poky-contrib/log/?h=timo/deprecate_distutils_14610 <https://git.yoctoproject.org/poky-contrib/log/?h=timo/deprecate_distutils_14610>

I have another branch to drop distutils completely, but I will hold off on that for now. The intent is to merge deprecated_distutils first.

One big sticking point is the use of distutils.version.LooseVersion, which is recommended to be replaced by packaging.version.Version. This is one thing that is difficult to replace directly with other libraries in CPython core.

A key place where this is not obvious how to replace is in sanity.bbclass. Our easiest path forward would be to require the host to have 'packaging' (pip install packaging, etc.). We could also wholesale lift LooseVersion and add it to lib/bb/.

I think this should be fine approach, which can perhaps sail the migration through and then we can unbolt it, like what we did with lnr


Please speak up with your concerns about the branch or ideas about how to handle the removal of LooseVersion.

There are additional changes around Python packaging (egg-info => wheels and setup.py => pyproject.toml), but that is a separate conversation.

Cheers,

--Tim




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#1369): 
https://lists.openembedded.org/g/openembedded-architecture/message/1369
Mute This Topic: https://lists.openembedded.org/mt/87296442/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-architecture/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to