Z3c.dependencychecker throw an error `No module named 'pkg_resources'`

in a plone/meta based project i run tox -e dependencies

dependencies: commands[1]> dependencychecker
Traceback (most recent call last):
  File "/home/jan/Development/Projects/projects/my.addon/.tox/dependencies/bin/dependencychecker", line 5, in <module>
    from z3c.dependencychecker.main import main
  File "/home/jan/Development/Projects/projects/my.addon/.tox/dependencies/lib/python3.12/site-packages/z3c/dependencychecker/main.py", line 6, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
dependencies: exit 1 (0.02 seconds) /home/jan/Development/Projects/projects/my.addon> dependencychecker pid=4170397
  dependencies: FAIL code 1 (1.44=setup[0.01]+cmd[1.41,0.02] seconds)
  evaluation failed :( (1.51 seconds)

is there a way to check the deps without z3c.dependencychecker ?

You need to force, somehow, the installation of setuptools < 82.0.0; or update the depencencychecker to remove the usage of pkg_resources :frowning:

:face_with_raised_eyebrow:

the quick fix, pin setuptools in the tox.ini:

[testenv:dependencies]
description = check if the package defines all its dependencies
skip_install = true
deps =
    build
    setuptools<82.0.0
    z3c.dependencychecker==2.14.3
commands =
    python -m build --sdist
    dependencychecker

but the refactoring of z3c.dependencychecker is the better way