python-pyvirtualize fails to build with Sphinx 6.1.3 in Fedora 39 (currently Rawhide). For the logs from testing build attempts, see: https://copr.fedorainfracloud.org/coprs/ksurma/sphinx-6.1.3/package/python-pyvirtualize/ You can test you package in mock running: $ mock -r fedora-rawhide-x86_64 --addrepo=https://download.copr.fedorainfracloud.org/results/ksurma/sphinx-6.1.3/fedora-rawhide-x86_64/ --no-clean your.src.rpm $ mock -r fedora-rawhide-x86_64 --addrepo=https://download.copr.fedorainfracloud.org/results/ksurma/sphinx-6.1.3/fedora-rawhide-x86_64/ shell The issue detected: Package attempts to modify `_static/jquery.js` which was removed from Sphinx 6+ and moved to a separate sphinxcontrib package: jquery. If that file isn't needed in the documentation package, remove the lines attempting to access it from the spec file. Otherwise, the extension (packaged in Fedora as `python-sphinxcontrib-jquery`) could be used here. Sphinx 6.1.3 will be included in Fedora 39. Let us know here if you have any questions. Thank you!
> Package attempts to modify `_static/jquery.js` which was removed from Sphinx 6+ and moved to a separate sphinxcontrib package: jquery. > If that file isn't needed in the documentation package … How can I see if that file is used?
I think upstream is the most qualified in the matter. I tried to look further into the documentation, so I installed python-pyvirtualize-docs to my Fedora 37 (built with Sphinx 5.3). The docs are empty. I think the autodoc extension needs to import the classes to generate the documentation, but it fails, because it can't import `pyVim` and later `yaml` (there are several build attempts in the copr you can check: https://copr.fedorainfracloud.org/coprs/ksurma/sphinx-6.1.3/package/python-pyvirtualize/) Those are runtime dependencies that need to be added to the BuildRequires to achieve the proper imports. But even afterwards there are plenty of warnings and errors that prevent the docs from generating the contents. The first error is: "WARNING: autodoc: failed to import module 'pyVirtualize'; the following exception was raised: No module named 'pyvSphere'" That looked weird, so I installed python3-pyvirtualize (also to my Fedora 37) and tried to import the class in the interactive Python prompt. The first attempt fails, the second is successful. I don't understand why that's happening. To make sure, I installed the package from PyPI to a venv with Python 3.10 and 3.11 and ran the same commands to the same surprising result. >>> from pyVirtualize.pyvSphere import vSphere Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.11/site-packages/pyVirtualize/__init__.py", line 21, in <module> from pyvSphere import vSphere ModuleNotFoundError: No module named 'pyvSphere' >>> from pyVirtualize.pyvSphere import vSphere >>> --- Given that the docs are broken for some time, it seems like no one needs them or cares enough to file a ticket. My suggestion would be to drop them altogether from the package. The actual import issue looks worse. I'd suggest filing an issue upstream.
Maybe dependency generation is generally b0rken. In case of pip as preferred in upstream documentation, please try to get file requirements.txt from upstream and provide output of command. $ pip install -r requirements.txt
Please try to build in Fedora 38, too. By the way, Fedora 39 has change request to use RPM 4.19 as new feature. Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: python(abi) = 3.11 python3.11dist(alabaster) >= 0.7.10 python3.11dist(appdirs) >= 1.4.3 python3.11dist(babel) >= 2.4 python3.11dist(colorama) >= 0.3.9 python3.11dist(docutils) >= 0.13.1 python3.11dist(imagesize) >= 0.7.1 python3.11dist(jinja2) >= 2.9.6
The runtime dependencies are generated correctly, but when they are - after the RPM build - it's already too late. They're also needed in the environment during the build time. I don't see the automatic generator of the build time dependencies enabled in the spec file. They all seem to be declared manually (https://src.fedoraproject.org/rpms/python-pyvirtualize/blob/rawhide/f/python-pyvirtualize.spec#_44) and they miss both `python3-pyvmomi` and `python3-pyyaml`. This should be added to the specfile if you still want to build the documentation package. Then there's the other issue with the non-working import, which I can't help with. I think the upstream will know better how to proceed.
Ah, there's a SHOULD in python dependency guidelines. Propably I've failed to understand and default might change from release to release due to I'm quite sure it worked with initial rawhide (expect something EOL before F35). https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Automatically-generated-dependencies What defaults could we use as assumption?
FEDORA-2023-e545d10672 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-e545d10672
FEDORA-2023-42e6850942 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-42e6850942
FEDORA-2023-42e6850942 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-42e6850942` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-42e6850942 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-e545d10672 has been pushed to the Fedora 38 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-e545d10672 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
Thank you for fixing the package. The build of the docs with Sphinx 6.1.3 will still fail because of the line: rm -v docs/build/html/_static/jquery*.js https://src.fedoraproject.org/rpms/python-pyvirtualize/blob/rawhide/f/python-pyvirtualize.spec#_98 There's no jquery in the Sphinx 6, so this line should be removed.
Rawhide is still based on f38 that I can support for now. Please feel free to submit patch or pull request for f39+.
(In reply to Karolina Surma from comment #11) > There's no jquery in the Sphinx 6, so this line should be removed. There's a build conditional for obsolete dependency. Why is rm so strict?
[rawhide 9442c6a] skip jquery with sphinx 6
FEDORA-2023-42e6850942 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-e545d10672 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.