|
|
|
|
@@ -11,6 +11,11 @@
|
|
|
|
|
%bcond_without imagemagick_tests
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# When bootstrapping sphinx, we don't yet have sphinxcontrib-websupport
|
|
|
|
|
%bcond_without websupport
|
|
|
|
|
# Also, we don't have all the tests requirements
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
|
|
|
|
|
# Currently, python2 version is always the default: https://fedoraproject.org/wiki/Packaging:Python#Naming
|
|
|
|
|
%if 1
|
|
|
|
|
%global py3_default 0
|
|
|
|
|
@@ -21,12 +26,11 @@
|
|
|
|
|
%global upstream_name Sphinx
|
|
|
|
|
|
|
|
|
|
Name: python-sphinx
|
|
|
|
|
Version: 1.7.2
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Version: 1.8.4
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Epoch: 1
|
|
|
|
|
Summary: Python documentation generator
|
|
|
|
|
|
|
|
|
|
Group: Development/Tools
|
|
|
|
|
|
|
|
|
|
# Unless otherwise noted, the license for code is BSD
|
|
|
|
|
# sphinx/util/stemmer.py Public Domain
|
|
|
|
|
@@ -49,9 +53,9 @@ Source6: default-sphinx-command.in
|
|
|
|
|
# to fetch images, which is not possible in koji or mock.
|
|
|
|
|
Patch0: xfail-test_latex_remote_images.patch
|
|
|
|
|
|
|
|
|
|
# Fix test_autodoc failure with Python 3.6.5
|
|
|
|
|
# Fixed upstream: https://github.com/sphinx-doc/sphinx/pull/4822
|
|
|
|
|
patch1: fix-test_autodoc.patch
|
|
|
|
|
# Allow extra themes to exist. We pull in python[23]-sphinx-theme-alabaster
|
|
|
|
|
# which causes that test to fail.
|
|
|
|
|
Patch1: sphinx-test_theming.diff
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: python2-devel >= 2.4
|
|
|
|
|
@@ -67,13 +71,15 @@ BuildRequires: python2-imagesize
|
|
|
|
|
BuildRequires: python2-requests
|
|
|
|
|
BuildRequires: python2-packaging
|
|
|
|
|
BuildRequires: python2-typing
|
|
|
|
|
%if %{with websupport}
|
|
|
|
|
BuildRequires: python2-sphinxcontrib-websupport
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: environment(modules)
|
|
|
|
|
|
|
|
|
|
# for fixes
|
|
|
|
|
BuildRequires: dos2unix
|
|
|
|
|
|
|
|
|
|
# for testing
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python2-nose
|
|
|
|
|
BuildRequires: python2-pytest
|
|
|
|
|
BuildRequires: python2-pytest-cov
|
|
|
|
|
@@ -82,7 +88,6 @@ BuildRequires: texinfo
|
|
|
|
|
BuildRequires: graphviz
|
|
|
|
|
BuildRequires: python2-sqlalchemy
|
|
|
|
|
BuildRequires: python2-mock
|
|
|
|
|
BuildRequires: python2-simplejson
|
|
|
|
|
BuildRequires: python2-html5lib
|
|
|
|
|
BuildRequires: python2-whoosh
|
|
|
|
|
BuildRequires: python2-snowballstemmer
|
|
|
|
|
@@ -90,8 +95,6 @@ BuildRequires: python2-enum34
|
|
|
|
|
%if %{with imagemagick_tests}
|
|
|
|
|
BuildRequires: ImageMagick
|
|
|
|
|
%endif
|
|
|
|
|
# note: no Python3 xapian binding yet
|
|
|
|
|
BuildRequires: python2-xapian
|
|
|
|
|
BuildRequires: texlive-collection-fontsrecommended
|
|
|
|
|
BuildRequires: texlive-collection-latex
|
|
|
|
|
BuildRequires: texlive-dvipng
|
|
|
|
|
@@ -126,6 +129,7 @@ BuildRequires: tex(tabulary.sty)
|
|
|
|
|
BuildRequires: tex(polyglossia.sty)
|
|
|
|
|
BuildRequires: tex(ctablestack.sty)
|
|
|
|
|
BuildRequires: tex(eu1enc.def)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
@@ -134,22 +138,25 @@ BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-docutils
|
|
|
|
|
BuildRequires: python3-jinja2
|
|
|
|
|
BuildRequires: python3-pygments
|
|
|
|
|
BuildRequires: python3-nose
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-pytest-cov
|
|
|
|
|
BuildRequires: python3-sqlalchemy
|
|
|
|
|
BuildRequires: python3-mock
|
|
|
|
|
BuildRequires: python3-simplejson
|
|
|
|
|
BuildRequires: python3-html5lib
|
|
|
|
|
BuildRequires: python3-whoosh
|
|
|
|
|
BuildRequires: python3-snowballstemmer
|
|
|
|
|
BuildRequires: python3-six
|
|
|
|
|
BuildRequires: python3-sphinx_rtd_theme
|
|
|
|
|
BuildRequires: python3-sphinx-theme-alabaster
|
|
|
|
|
BuildRequires: python3-packaging
|
|
|
|
|
BuildRequires: python3-imagesize
|
|
|
|
|
BuildRequires: python3-requests
|
|
|
|
|
%if %{with websupport}
|
|
|
|
|
BuildRequires: python3-sphinxcontrib-websupport
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python3-nose
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-pytest-cov
|
|
|
|
|
BuildRequires: python3-sqlalchemy
|
|
|
|
|
BuildRequires: python3-mock
|
|
|
|
|
BuildRequires: python3-html5lib
|
|
|
|
|
BuildRequires: python3-whoosh
|
|
|
|
|
BuildRequires: python3-snowballstemmer
|
|
|
|
|
%endif
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -198,7 +205,9 @@ Requires: python2-imagesize
|
|
|
|
|
Requires: python2-requests
|
|
|
|
|
Requires: python2-packaging
|
|
|
|
|
Requires: python2-typing
|
|
|
|
|
%if %{with websupport}
|
|
|
|
|
Requires: python2-sphinxcontrib-websupport
|
|
|
|
|
%endif
|
|
|
|
|
Requires: environment(modules)
|
|
|
|
|
# Needed to get rid of the alternatives config installed in f24 and f25
|
|
|
|
|
# versions of the package
|
|
|
|
|
@@ -297,7 +306,6 @@ builder.
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%package -n python3-sphinx
|
|
|
|
|
Summary: Python documentation generator
|
|
|
|
|
Group: Development/Tools
|
|
|
|
|
Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release}
|
|
|
|
|
Requires: python3-babel
|
|
|
|
|
Requires: python3-docutils
|
|
|
|
|
@@ -310,8 +318,10 @@ Requires: python3-sphinx-theme-alabaster
|
|
|
|
|
Requires: python3-imagesize
|
|
|
|
|
Requires: python3-requests
|
|
|
|
|
Requires: python3-six
|
|
|
|
|
Requires: python3-sphinxcontrib-websupport
|
|
|
|
|
Requires: python3-packaging
|
|
|
|
|
%if %{with websupport}
|
|
|
|
|
Requires: python3-sphinxcontrib-websupport
|
|
|
|
|
%endif
|
|
|
|
|
Recommends: graphviz
|
|
|
|
|
Recommends: ImageMagick
|
|
|
|
|
Requires: environment(modules)
|
|
|
|
|
@@ -356,7 +366,6 @@ the Python docs:
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Group: Documentation
|
|
|
|
|
License: BSD
|
|
|
|
|
Requires: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
@@ -373,7 +382,6 @@ This package contains documentation in reST and HTML formats.
|
|
|
|
|
|
|
|
|
|
%package locale
|
|
|
|
|
Summary: Locale files for %{name}
|
|
|
|
|
Group: Development/Tools
|
|
|
|
|
License: BSD
|
|
|
|
|
|
|
|
|
|
%description locale
|
|
|
|
|
@@ -394,10 +402,14 @@ cp %{SOURCE5} .
|
|
|
|
|
# fix line encoding of bundled jquery.js
|
|
|
|
|
dos2unix -k ./sphinx/themes/basic/static/jquery.js
|
|
|
|
|
|
|
|
|
|
%if ! %{with imagemagick_tests}
|
|
|
|
|
%if %{without imagemagick_tests}
|
|
|
|
|
rm tests/test_ext_imgconverter.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{without websupport}
|
|
|
|
|
rm tests/test_websupport.py tests/test_api_translator.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
|
@@ -409,9 +421,16 @@ cp -a . %{py3dir}
|
|
|
|
|
%py3_build
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
export PYTHONPATH=$PWD
|
|
|
|
|
pushd doc
|
|
|
|
|
make html
|
|
|
|
|
make man
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
export SPHINXBUILD="%{__python3} ../sphinx/cmd/build.py"
|
|
|
|
|
%else
|
|
|
|
|
export SPHINXBUILD="%{__python2} ../sphinx/cmd/build.py"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
make html SPHINXBUILD="$SPHINXBUILD"
|
|
|
|
|
make man SPHINXBUILD="$SPHINXBUILD"
|
|
|
|
|
rm -rf _build/html/.buildinfo
|
|
|
|
|
mv _build/html ..
|
|
|
|
|
popd
|
|
|
|
|
@@ -520,21 +539,26 @@ done
|
|
|
|
|
>> sphinx.lang
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
export PYTHONPATH=$PWD
|
|
|
|
|
|
|
|
|
|
# Currently, all linkcheck tests hit external websites. Since network access
|
|
|
|
|
# is disabled in koji, we have to disable these.
|
|
|
|
|
rm tests/test_build_linkcheck.py
|
|
|
|
|
|
|
|
|
|
# Igoring test_api_translator for now as it fails on Fedora.
|
|
|
|
|
# The issue has been reported upstream: https://github.com/sphinx-doc/sphinx/issues/4710
|
|
|
|
|
LANG=en_US.UTF-8 %{__python2} -m pytest -v --ignore=tests/test_api_translator.py
|
|
|
|
|
LANG=C.UTF-8 pytest-2
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
# Currently, all linkcheck tests hit external websites. Since network access
|
|
|
|
|
# is disabled in koji, we have to disable these.
|
|
|
|
|
rm tests/test_build_linkcheck.py
|
|
|
|
|
LANG=en_US.UTF-8 PYTHON=python3 make test
|
|
|
|
|
pytest-3
|
|
|
|
|
popd
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
%endif # with tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files latex
|
|
|
|
|
@@ -590,6 +614,47 @@ popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Feb 07 2019 Alfredo Moralejo <amoralej@redhat.com> - 1:1.8.4-1
|
|
|
|
|
- Update to 1.8.4.
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.7.6-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:1.7.6-2
|
|
|
|
|
- Drop explicit locale setting for python3, use C.UTF-8 for python2
|
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
|
|
|
|
|
|
|
|
|
|
* Mon Jul 23 2018 Marcel Plch <mplch@redhat.com> - 1:1.7.6-1
|
|
|
|
|
- Update to 1.7.6
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-6
|
|
|
|
|
- Remove unused dependencies on xapian and simplejson
|
|
|
|
|
|
|
|
|
|
* Thu Jul 5 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:1.7.5-5
|
|
|
|
|
- Add patch to fix build if alabaster theme is installed
|
|
|
|
|
- Add patch for #1589868
|
|
|
|
|
|
|
|
|
|
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-4
|
|
|
|
|
- Enable tests
|
|
|
|
|
|
|
|
|
|
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-3
|
|
|
|
|
- Enable websupport
|
|
|
|
|
|
|
|
|
|
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-2
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Tue Jun 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.7.5-1
|
|
|
|
|
- Update to 1.7.5 (bz#1570451)
|
|
|
|
|
|
|
|
|
|
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-5
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-4
|
|
|
|
|
- Bootstrap for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-3
|
|
|
|
|
- Bootstrap for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Wed Apr 11 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.2-2
|
|
|
|
|
- Conditionalize the ImageMagick build dependency & tests
|
|
|
|
|
|
|
|
|
|
|