Too much work. Just use bundled python3.inv

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=156
This commit is contained in:
2020-07-16 13:22:51 +00:00
committed by Git OBS Bridge
parent 7b215bb109
commit cd9cbea3a6

View File

@@ -227,26 +227,10 @@ 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
%if %{python3_version_nodots} <= 36
# python3-doc 3.6.5-lp151.5.4 from Leap 15.1
# doesn't have one necessary entry in python3.inv
# so use a copy from version 3.8.2-3.1 from Tumbleweed
cp %{SOURCE2} doc/python3.inv
%else
%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'%{__pydocprefix}.inv'\2/g" doc/conf.py
%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_exec setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%python_exec setup.py build_sphinx -b man