Bug 1977645

Summary: python-ruffus fails to build with Sphinx 4.0.2
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-ruffusAssignee: Elliott Sales de Andrade <quantum.analyst>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: python-sig, quantum.analyst
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-ruffus-2.8.4-6.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-12 08:59:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1973718    

Description Karolina Surma 2021-06-30 08:23:11 UTC
python-ruffus fails to build with Sphinx 4.0.2 in Fedora 35 (currently Rawhide).

+ sphinx-build-3 doc html
Running Sphinx v4.0.2
['/builddir/build/BUILD/ruffus-2.8.4', '/usr/bin', '/builddir/build/BUILD/ruffus-2.8.4', '/usr/lib64/python310.zip', '/usr/lib64/python3.10', '/usr/lib64/python3.10/lib-dynload', '/usr/lib64/python3.10/site-packages', '/usr/lib/python3.10/site-packages']
2.8.4 2.8.4
making output directory... done
Exception occurred:
  File "/builddir/build/BUILD/ruffus-2.8.4/doc/conf.py", line 24, in setup
    app.add_stylesheet("ruffus.css")
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'

For the logs from testing build attempts, see:
https://copr.fedorainfracloud.org/coprs/ksurma/pygments-2.9.0/package/python-ruffus/

Possible solution to this issue:
In some cases it may be enough to replace the call to 'add_stylesheet' with 'add_css_file' instead.

You can test you package using Koji scratch build
koji build --scratch <srpm>

For details regarding the Sphinx change, see https://fedoraproject.org/wiki/Changes/Sphinx4
Let us know here if you have any questions. Thank you!