#1147920 sphinxcontrib-jsmath: FTBFS: E ModuleNotFoundError: No module named 'pkg_resources'

#1147920#5
Date:
2026-09-15 11:17:00 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202609/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:sphinxcontrib-jsmath, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    # -*- coding: utf-8 -*-
sphinxcontrib/__init__.py:2: ModuleNotFoundError

The above exception was the direct cause of the following exception:

test_params = {'shared_result': None}
app_params = _app_params(args=['html'], kwargs={'srcdir': PosixPath('/tmp/pytest-of-sbuild/pytest-0/nomath'), 'builddir': PosixPath('/tmp/pytest-of-sbuild/pytest-0/nomath/_build')})
make_app = <function make_app.<locals>.make at 0x7f62cdf7dd20>
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f62ce001d10>

    @pytest.fixture
    def app(
        test_params: dict[str, Any],
        app_params: _app_params,
        make_app: Callable[..., SphinxTestApp],
        shared_result: SharedResult,
    ) -> Iterator[SphinxTestApp]:
        """Provides the 'sphinx.application.Sphinx' object"""
        args, kwargs = app_params
               ^^^^^^^^^^^^^^^^^^^^^^^^^

/usr/lib/python3/dist-packages/sphinx/testing/fixtures.py:159:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/sphinx/testing/fixtures.py:202: in make
    app_ = SphinxTestApp(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/sphinx/testing/util.py:177: in __init__
    super().__init__(
/usr/lib/python3/dist-packages/sphinx/application.py:308: in __init__
    self.setup_extension(extension)
/usr/lib/python3/dist-packages/sphinx/application.py:514: in setup_extension
    self.registry.load_extension(self, extname)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7f62ce001f90>
app = <SphinxTestApp buildername='html'>, extname = 'sphinxcontrib.jsmath'

    def load_extension(self, app: Sphinx, extname: str) -> None:
        """Load a Sphinx extension."""
        if extname in app.extensions:  # already loaded
            return
        if extname in EXTENSION_BLACKLIST:
            logger.warning(
                __(
                    'the extension %r was already merged with Sphinx since '
                    'version %s; this extension is ignored.'
                ),
                extname,
                EXTENSION_BLACKLIST[extname],
            )
            return

        # update loading context
        prefix = __('while setting up extension %s:') % extname
        with prefixed_warnings(prefix):
            try:
                mod = import_module(extname)
            except ImportError as err:
                logger.verbose(__('Original exception:\n') + traceback.format_exc())
/usr/lib/python3/dist-packages/sphinx/registry.py:553: ExtensionError
=========================== short test summary info ============================
ERROR tests/test_jsmath.py::test_basic - sphinx.errors.ExtensionError: Could ...
ERROR tests/test_jsmath.py::test_numfig_enabled - sphinx.errors.ExtensionErro...
ERROR tests/test_jsmath.py::test_disabled_when_equations_not_found - sphinx.e...
============================== 3 errors in 0.29s ===============================
E: pybuild pybuild:485: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_sphinxcontrib.jsmath/build; python3.14 -m pytest tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.14 --parallel=2 returned exit code 13
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------