tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USE_PKG_RESOURCES and wheel.mk



On Mon, Apr 07, 2025 at 07:25:08PM -0400, Greg Troxel wrote:
> In a package that used wheel.mk and where upstream noted that it used
> pkg_resources, I set USE_PKG_RESOURCES.  But wheel.mk doesn't support
> that.
> 
> It seems pkg_resources is deprecated:
> 
>   https://setuptools.pypa.io/en/latest/pkg_resources.html
> 
> but we package things that still use it, and sometimes we do that with
> wheel.mk.
> 
> The overall situation is buggy :-)
> 
> I can see three reasonable approaches:
> 
>   Noting in wheel.mk in comments that USE_PKG_RESOURCES is not
>   implemented, and that instead one should DEPEND on setuptools.

I'm for this solution.  The replacement modules importlib.resources
and importlib.metadata are available since Python 3.7 and 3.8
respectively, i.e. 2019.

Add a comment with the upstream bug report that a package still uses
pkg_resources, and add a DEPENDS line on setuptools below that.

How many packages have you found that actually need this?
 Thomas


Home | Main Index | Thread Index | Old Index