On Mon, 09 Jan 2023, Stuart Henderson wrote:

> On 2023/01/09 09:53, Florian Obser wrote:
> > Hi there,
> > 
> > after moving ephemetoot to a different server it failed thusly:
> > 
> > Traceback (most recent call last):
> >   File "/usr/local/bin/ephemetoot", line 5, in <module>
> >     from ephemetoot.console import main
> >   File "/usr/local/lib/python3.10/site-packages/ephemetoot/console.py", 
> > line 33, in <module>
> >     import pkg_resources
> > ModuleNotFoundError: No module named 'pkg_resources'
> > 
> > Turns out the old server had py3-setuptools installed for unrelated
> > reasons.
> > 
> > So should this just be a run-dep? I don't have time to figure out *why*
> > it wants pkg_resources, that seems... odd... for a normal package.
> 
> I've added the RDEP (I dropped the automatic RDEP for all setuptools
> ports with the switch to py3.10 as the default version; most ports don't
> need it).
> 
> ephemetoot's use of pkg_resources is in
> https://github.com/hughrun/ephemetoot/blob/999abcb934a66ac6e054ad0846984b42594b2199/ephemetoot/console.py#L39
> - seems this could be easily replaced with
> https://docs.python.org/3/library/importlib.metadata.html#version (in
> core Python and now generally considered a better idea).

Thank you Stuart for taking care of this and Florian for bringing it up.
I've sent a patch upstream to remove the dependency and use
importlib.metadata instead.

-- 
Paco Esteban.
0x5818130B8A6DBC03

Reply via email to