Discussion:
Dependency on pkg-resources
(too old to reply)
Antonio Valentino
2024-10-05 10:40:01 UTC
Permalink
Dear all,
recently bugs have been filled for several packages with the following
subject:

"(build-)depends on deprecated module python3-pkg-resources"

I started working on the ones for which I'm maintainer and I realized
that for some of them (e.g. pyresample and cyarray) there is no direct
dependency from "python3-pkg-resources" in the debian/control file.

Apparently the dependency is injected by dh-python in the final package,
as far as I can understand.


I suppose that this is something that should be addressed in dh-python,
but I'm not sure if there are short term plans for it.

What is the recommended way to proceed?


kind regards
--
Antonio Valentino
Stefano Rivera
2024-10-06 14:10:01 UTC
Permalink
Hi Antonio (2024.10.05_10:30:07_+0000)
I started working on the ones for which I'm maintainer and I realized that
for some of them (e.g. pyresample and cyarray) there is no direct dependency
from "python3-pkg-resources" in the debian/control file.
Apparently the dependency is injected by dh-python in the final package, as
far as I can understand.
It's coming from an upstream dependency on setuptools (requires).

Most packages do not have any need for setuptools at runtime. So Debian
splits pkg-resources from setuptools. If a package declares a python
dependency on setuptools, we convert that into a Debian dependency on
python3-pkg-resources. If a package *really* needs setuptools at runtime,
it adds an explicit Debian dependency on it.

So, in your case, the upstream probably has a completely unnecessary
requires for setuptools. Probably should use install_requires instead,
or even better pyproject's build-system requires.
What is the recommended way to proceed?
Submit a patch to your upstream, removing the unnecessary requires.

Stefano
--
Stefano Rivera
http://tumbleweed.org.za/
+1 415 683 3272
Antonio Valentino
2024-10-07 17:50:01 UTC
Permalink
Dear Stefano,
Post by Stefano Rivera
Hi Antonio (2024.10.05_10:30:07_+0000)
I started working on the ones for which I'm maintainer and I realized that
for some of them (e.g. pyresample and cyarray) there is no direct dependency
from "python3-pkg-resources" in the debian/control file.
Apparently the dependency is injected by dh-python in the final package, as
far as I can understand.
It's coming from an upstream dependency on setuptools (requires).
Most packages do not have any need for setuptools at runtime. So Debian
splits pkg-resources from setuptools. If a package declares a python
dependency on setuptools, we convert that into a Debian dependency on
python3-pkg-resources. If a package *really* needs setuptools at runtime,
it adds an explicit Debian dependency on it.
understood, thanks
I was not considering the upstream "requires" indeed.
Post by Stefano Rivera
So, in your case, the upstream probably has a completely unnecessary
requires for setuptools. Probably should use install_requires instead,
or even better pyproject's build-system requires.
What is the recommended way to proceed?
Submit a patch to your upstream, removing the unnecessary requires.
OK will do
Post by Stefano Rivera
Stefano
cheers
--
Antonio Valentino
Loading...