Tox and release-check ModuleNotFoundError: No module named 'zope'

in my tox file based on plone/meta i have a section for release check

description = ensure that the distribution is ready to release
skip_install = true
deps =

commands =
  # fake version to not have to install the package
  # we build the change log as news entries might break
  # the README that is displayed on PyPI
  towncrier build --version=100.0.0 --yes
  python -m build --sdist
  twine check dist/*

if i run

tox -e release-check

it ends with an error:

from zope.i18nmessageid import MessageFactory
ModuleNotFoundError: No module named 'zope'
ERROR: InvocationError for command /opt/Development/collective/collective_tinymce_accordion_filter/.tox/release-check/bin/towncrier build --version=100.0.0 --yes (exited with code 1)

I see that the includes -c . This file contains the missing package zope.i18nmessageid.

Does anybody know, why the constraints.txt from is not evaluated?

My current workaround is add the package zope.i18nmessageid to the deps in the release-check section.

deps =


The commands executed are:

  • towncrier XXX does not need zope.i18nmessageid
  • python -m build --sdist which should not need zope.i18nmessageid unless on you have some imports to your code that eventually lead to importing zope.i18nmessageid
  • twine XXX does not need zope.i18nmessageid

Could it be that in your you are importing the package itself to get its version, or some other details of the package, and on that very same file, or a dependency of that file you also zope.i18nmessageid?

Yes i have some entries in the i have run tox -e dependencies and add the listed packages to the

you can see the error in this package:

This is my first addon in the collective workspace. i have minimal skills to provied a release ready package and i need a little bit help.