Fix autodoc build with the compiled extension modules
Resolves: RHEL-5664
This commit is contained in:
parent
419761fc2e
commit
47795653f0
25
Enable-autodoc-build-with-extension-modules.patch
Normal file
25
Enable-autodoc-build-with-extension-modules.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 924b2e2cee46753d26a8419f273ffe045bbfb9bb Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Tue, 21 Nov 2023 11:27:42 +0100
|
||||
Subject: [PATCH] Enable autodoc build with extension modules
|
||||
|
||||
---
|
||||
sphinx/ext/autodoc/__init__.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py
|
||||
index 54e91a1..dba5769 100644
|
||||
--- a/sphinx/ext/autodoc/__init__.py
|
||||
+++ b/sphinx/ext/autodoc/__init__.py
|
||||
@@ -1871,7 +1871,7 @@ class DataDocumenter(GenericAliasMixin, NewTypeMixin, TypeVarMixin,
|
||||
for (classname, attrname), annotation in analyzer.annotations.items():
|
||||
if classname == '' and attrname not in annotations:
|
||||
annotations[attrname] = annotation
|
||||
- except AttributeError:
|
||||
+ except (AttributeError, PycodeError):
|
||||
pass
|
||||
|
||||
def import_object(self, raiseerror: bool = False) -> bool:
|
||||
--
|
||||
2.41.0
|
||||
|
@ -28,7 +28,7 @@ Name: python-sphinx
|
||||
#global prerel ...
|
||||
%global upstream_version %{general_version}%{?prerel}
|
||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Python documentation generator
|
||||
|
||||
@ -45,6 +45,15 @@ Source0: %{pypi_source %{upstream_name} %{upstream_version}}
|
||||
# which causes that test to fail.
|
||||
Patch1: sphinx-test_theming.diff
|
||||
|
||||
# Fix autodoc build with extension modules:
|
||||
# additionally to AttributeError catch also PycodeError
|
||||
# Upstream has replaced one with another in Sphinx 3.5.x and later,
|
||||
# but to prevent any compatibility issues it's safer to only extend
|
||||
# the list of exceptions. Upstream fix:
|
||||
# https://github.com/sphinx-doc/sphinx/commit/50295f18c25020e15e9bc398a0689
|
||||
# Bug: https://issues.redhat.com/browse/RHEL-5664
|
||||
Patch2: Enable-autodoc-build-with-extension-modules.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: make
|
||||
@ -378,6 +387,10 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Nov 21 2023 Karolina Surma <ksurma@redhat.com> - 1:3.4.3-8
|
||||
- Fix autodoc build with the compiled extension modules
|
||||
Resolves: RHEL-5664
|
||||
|
||||
* Fri Oct 08 2021 Charalampos Stratakis <cstratak@redhat.com> - 1:3.4.3-7
|
||||
- Obsolete and provide the python-sphinx-locale package to fix the upgrade path
|
||||
Related: rhbz#1985219
|
||||
|
Loading…
Reference in New Issue
Block a user