Matej Cepl 2020-07-16 12:58:08 +00:00 committed by Git OBS Bridge
parent 9c403871fb
commit 2e84a7d851

View File

@ -227,6 +227,14 @@ sed -i 's/\r$//' sphinx/themes/basic/static/jquery.js # Fix wrong end-of-line en
%if %{with test}
mkdir build.doc
%{python_expand
%if "%{$python_prefix}" == "python%{$python_version}"
%define __pydocprefix python%{$python_version}
%else
%define __pydocprefix %{$python_prefix}
%endif
}
# get its intersphinx_inventroy from python3-doc
# instead of via network from https://docs.python.org/3/objects.inv
# https://github.com/sphinx-doc/sphinx/pull/7616
@ -236,9 +244,9 @@ mkdir build.doc
# so use a copy from version 3.8.2-3.1 from Tumbleweed
cp %{SOURCE2} doc/python3.inv
%else
%python_expand cp %{_defaultdocdir}/python%{$python_version}/html/objects.inv doc/python%{$python_version}.inv
%python_expand cp %{_defaultdocdir}/%{__pydocprefix}/html/objects.inv doc/python%{$python_version}.inv
%endif
%python_expand sed -i -e "s/\(intersphinx_mapping = ..python.: (.https:..docs.python.org.3.., \)None\()}\)/\1'python%{$python_version}.inv'\2/g" doc/conf.py
%python_expand sed -i -e "s/\(intersphinx_mapping = ..python.: (.https:..docs.python.org.3.., \)None\()}\)/\1'%{__pydocprefix}.inv'\2/g" doc/conf.py
%python_exec setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%python_exec setup.py build_sphinx -b man