• Dependency on pkg-resources

    From Antonio Valentino@21:1/5 to All on Sat Oct 5 12:40:01 2024
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefano Rivera@21:1/5 to All on Sun Oct 6 16:10:01 2024
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antonio Valentino@21:1/5 to All on Mon Oct 7 19:50:01 2024
    Dear Stefano,

    Il 06/10/24 16:06, Stefano Rivera ha scritto:
    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.

    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


    Stefano


    cheers
    --
    Antonio Valentino

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to All on Tue Dec 3 13:40:01 2024
    On Tue, Dec 03, 2024 at 01:17:17PM +0100, Elena ``of Valhalla'' Grandi wrote:
    * python3-setuptools is in Build-Depends, again probably not relevant;
    * setuptools is mentioned in setup.py *and* setup.cfg, but in both cases
    it is listed as an install_requires, not a requires.

    Anybody has any hint on what could be happening here?

    "install_requires is a Setuptools setup.py keyword that should be used to specify what a project minimally needs to run correctly" and there is no "requires". The counterpart of B-D in setup.py is "setup_requires".


    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmdO+ystFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh 2zwQAKdAAfQF4bYxb06UwX9kU2UPKtb5hIkUFBTet9ov0yLazN1lURnn8oyatOKz GgE3hf4YPNv4hjiWN9ebyGaN5ueWUNUhCZ/WX6XlKWylwLu3QpAM8EJKPDA7gro6 h1m4r9MZRg6O8VHq7jjoet9M9KpRbxwT3HDT976i9101vHS9Hy/hla+ViGNis2T1 CNsA9NXz81IeWHy6a0ai9HLdY5JJas62RCJni1jfrUF4cQJ1Yuepw9d0seJ9BCUD m0ggNKVX8lXwZAYZtAvy0LUFUQI/gFKzdRf6snIbhqy9hB++YI/DF2q/MGeE2Png ErgU7H5WvJIYXisEQfS1nFaMXa+/11PrALM0AJsLWx0s0J9rf/lz2iKlHz5/CQ8V bg4UXohCSSOa+GewpEGijTBi5+94ns1f9iQ9raxuEDP0dc5SRZrIrOr0X3SQ/gIl BGwz+znt8m3VR/nLovSlgujctwezC7g8NYEg62CjkSqePE//x/q2Ts8pMA5VBrjF k1Amxd09RjL1Ffe/l8midnhNYzmxd3gb64XHSMJfzC/aO1CH6tUesq48WeOXo3jk BAjiiKe52ctm2u00W4cv197YsBfGVlxj/hOWLCAESAdPaYhn9XVTEbkMnRjKNjhX vGE4LY5FelQERx20wqyvz8rqGZaCVyshP3huOmRORoUQJLJf
    =Dv+Z
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Elena ``of Valhalla'' Grandi@21:1/5 to Stefano Rivera on Tue Dec 3 13:30:02 2024
    Hello

    On 2024-10-06 at 14:06:44 +0000, Stefano Rivera wrote:
    [A dependency on pkg-resources is] coming from an upstream dependency
    on setuptools (requires).
    [...]
    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.

    I have a package (python-ghostscript) that is in a similar case, with a dependency on pkg-resources picked up from a dependency on setuptools,
    but I can't understand why it's happening:

    * setuptools is mentioned in requirements.txt, but the other packages in
    that file aren't picked up as dependencies (which is good);
    * setuptools is mentioned in tox.ini, which should be totally irrelevant;
    * python3-setuptools is in Build-Depends, again probably not relevant;
    * setuptools is mentioned in setup.py *and* setup.cfg, but in both cases
    it is listed as an install_requires, not a requires.

    Anybody has any hint on what could be happening here?

    --
    Elena ``of Valhalla''

    -----BEGIN PGP SIGNATURE-----

    iQEzBAABCAAdFiEEY8n6rGg5PpTPkl4ZcL0i0xEjtDEFAmdO9soACgkQcL0i0xEj tDGq4Af/S7urr/931IkYU0a5HBHimH1SWyVR/SANO4XO9KMRC/pqnHl4gHfly50n m3Yub+JnTaT/65fWzMFiBTyzEC0FC0aSAPPzPIpFGkIlD9rRgH6IdCsz8W4dOx8d i1zv1bP8tfYIFduIpTv3XKjIjcZ0bN9O4ctQ0A5jb/PPR7IBtr1LlZsA6UDN10rT tkLA9Ec4aC9ULjJ3Qx14VPZsvCm2GAWooB4iQO8XlSouFJdSrVB4ATwL2mTK2PIx WfDcN83bHqt2l2+etGMaO4+bW43/uBRlkLDFyYQbOuzooBfRPRiZHcHmvpQvhO7v CBAV+HrSjsQd97XFUriuj8hnW8xjdQ==
    =lBBc
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Elena ``of Valhalla'' Grandi@21:1/5 to Andrey Rakhmatullin on Tue Dec 3 14:20:02 2024
    On 2024-12-03 at 17:35:55 +0500, Andrey Rakhmatullin wrote:
    On Tue, Dec 03, 2024 at 01:17:17PM +0100, Elena ``of Valhalla'' Grandi wrote:
    * python3-setuptools is in Build-Depends, again probably not relevant;
    * setuptools is mentioned in setup.py *and* setup.cfg, but in both cases
    it is listed as an install_requires, not a requires.

    Anybody has any hint on what could be happening here?

    "install_requires is a Setuptools setup.py keyword that should be used to specify what a project minimally needs to run correctly" and there is no "requires". The counterpart of B-D in setup.py is "setup_requires".

    Thanks!

    patching it to setup_requires did indeed remove the dependency on python3-pkg-resources, and I can now proceed with an upload to close the
    bug.

    --
    Elena ``of Valhalla''

    -----BEGIN PGP SIGNATURE-----

    iQEzBAABCAAdFiEEY8n6rGg5PpTPkl4ZcL0i0xEjtDEFAmdPA3gACgkQcL0i0xEj tDE1nggAl8RRayfE/N88+6SajRN+zOrT73N3nLi7Y8U0mkZVtFoLuyT+hOxhnzWP tt8qwLw9zTMCpH2HAccBt/OXkqEjB8/GLMOpbf6749/fAz9PBDdwy8GpgOCfHOyg Dac5I+ltGtvidDOcckTohkCpl1NmXfwyIVVEql3H0xLCA1eOTqjSCmsI3Nb4XEdM 0y61C8yNol9yJdVXwuxcOx/Zs+L774Mu0OLp0DFReO8kSVGhCFVl9dsoihkFvYWg 0BxU/JdW6nxG4Ke7oXICY9EmeWbCSTLGsn5n4xQTxpIslohxQB8LEv2gPP/Bd5bt mIlvV51eU741BMC8RqGFJodVVJd9pA==
    =EJBN
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)