Re: [yocto-patches] [yocto-autobuilder2][RFC] master.cfg: Replace pkg_resources with importlib.metadata

Richard Purdie <[email protected]>
Newsgroups org.yoctoproject.lists.yocto-patches
Message-ID <7fe5f6f964889ffc37d62cc0d2fb734dc53c6434.camel@linuxfoundation.org>
On Thu, 2026-04-16 at 18:37 -0700, Tim Orling via lists.yoctoproject.org wrote:
> pkg_resources (from setuptools) is deprecated. Replace the fake
> Distribution/EntryPoint/working_set manipulation with
> importlib.metadata equivalents:
> 
> - Intercept importlib.metadata.version() for the local plugin, since
>   buildbot's Application() calls it at import time before the plugin
>   is registered.
> - Use importlib.metadata.EntryPoint directly instead of the old
>   pkg_resources.EntryPoint.parse() plus fake Distribution approach.
> - Remove the now-unused os import.
> 
> Signed-off-by: Tim Orling <[email protected]>
> ---
> This has been working for me on my local AB cluster, where the
> controller is running on a Debian 13 AMD Ryzen system.

Nice!

I think Michael gave up on the local install and is building/running
things a bit differently. I did find this approach handy for local
development and did try and get it working again but failed and
couldn't spend more time on it.

I'm happy to merge this and replace what is there as it has to be an
improvement, thanks!

Cheers,

Richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.