Hi Seb, Am 29.01.22 um 15:12 schrieb Sebix:
Dear fellows,
I have some troubles with two sphinxcontrib packages (but others are likely similar). Since a few weeks , the builds, actually the docs, fail with:
[ 99s] + pushd docs [ 99s] ~/rpmbuild/BUILD/sphinxcontrib-asyncio-0.3.0/docs ~/rpmbuild/BUILD/sphinxcontrib-asyncio-0.3.0 [ 99s] + PYTHONPATH=.. [ 99s] + make html [ 99s] sphinx-build -b html -d _build/doctrees . _build/html [ 100s] Running Sphinx v4.4.0 [ 100s] [ 100s] Extension error: [ 100s] Could not import extension sphinxcontrib.asyncio (exception: No module named 'sphinxcontrib.asyncio') [ 100s] make: *** [Makefile:56: html] Error 2 [ 100s] error: Bad exit status from /var/tmp/rpm-tmp.TJFdic (%build)
While the PYTHONPATH is set correctly, the problem is, that the module sphinxcontrib is loaded from the sitelib. There, no asyncio sub-module exists and the loading of sphinxcontrib.asyncio fails. Maybe this is due to changed Python behavior of finding modules? I haven't seen anything related in the Python changelogs however. Does anyone has an idea how to circumvent this issue, or a best practice?
sphinxcontrib-* are pkg_resources-style namespace packages. https://packaging.python.org/en/latest/guides/packaging-namespace-packages/ The culprit is hinted at by this line in python-sphinxcontrib-asyncio.spec:
# Remove sphinxcontrib namespace package files provided by python-Sphinx
python38-Sphinx does not provide the pkg_resources style __init__.py file from python-Sphinx (anymore?), but all the python-sphinxcontrib-* packages expect it. The PYPI packages all provide it and overwrite each other during install, but we can't allow those file conflicts in a rpm package. So either python-Sphinx needs to reintroduce this file or there needs to be a python-sphinxcontrib package providing it, which all python-sphinxcontrib-* packages depend on. I didn't check. Maybe it exists and is just not in the dependency tree?
cheers, Sebix
- Ben