14
0
forked from pool/python-Sphinx

Accepting request 802658 from home:jzerebecki:branches:devel:languages:python

- update to version 3.0.3

compared to superseded request:
change added BuildRequires to use python_module macro and remove Suggests:python3-doc

OBS-URL: https://build.opensuse.org/request/show/802658
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=149
This commit is contained in:
2020-05-11 13:43:53 +00:00
committed by Git OBS Bridge
parent 69cf40be2c
commit f5d5725a04
7 changed files with 366 additions and 4 deletions

View File

@@ -28,13 +28,14 @@
%endif
%define skip_python2 1
Name: python-Sphinx%{psuffix}
Version: 2.3.1
Version: 3.0.3
Release: 0
Summary: Python documentation generator
License: BSD-2-Clause
Group: Development/Languages/Python
URL: http://sphinx-doc.org
Source: https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
Source1: https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz.asc
Source99: python-Sphinx-rpmlintrc
BuildRequires: %{python_module base}
BuildRequires: %{python_module setuptools}
@@ -66,8 +67,10 @@ Recommends: python-Sphinx-doc-man
Recommends: python-Whoosh >= 2.0
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module Sphinx = %{version}}
BuildRequires: %{python_module Sphinx-latex = %{version}}
BuildRequires: %{python_module doc}
BuildRequires: %{python_module html5lib}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module sphinxcontrib-websupport}
@@ -223,6 +226,20 @@ sed -i 's/\r$//' sphinx/themes/basic/static/jquery.js # Fix wrong end-of-line en
%if %{with test}
mkdir build.doc
# 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 %_sourcedir/python3.inv doc/python3.inv
%else
cp /usr/share/doc/packages/python3/html/objects.inv doc/python3.inv
%endif
sed -i -e "s/\(intersphinx_mapping = ..python.: (.https:..docs.python.org.3.., \)None\()}\)/\1'python3.inv'\2/g" doc/conf.py
# fix file not found error
sed -i -e 's/.. include:: ...CODE_OF_CONDUCT//g' doc/code_of_conduct.rst
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
python3 setup.py build_sphinx -b man