|
|
|
@@ -5,11 +5,15 @@
|
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# more work needed; currently sphinx-build fails when
|
|
|
|
|
# some latex files are unavailable - bz#1185574
|
|
|
|
|
%bcond_with splitlatex
|
|
|
|
|
|
|
|
|
|
%global upstream_name Sphinx
|
|
|
|
|
|
|
|
|
|
Name: python-sphinx
|
|
|
|
|
Version: 1.1.3
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Release: 12%{?dist}
|
|
|
|
|
Summary: Python documentation generator
|
|
|
|
|
|
|
|
|
|
Group: Development/Tools
|
|
|
|
@@ -24,15 +28,38 @@ Source0: http://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream
|
|
|
|
|
# Sent upstream as a fix to work with the next version of docutils
|
|
|
|
|
# https://bitbucket.org/birkenfeld/sphinx/issue/998/docutils-010-will-break-sphinx-manpage
|
|
|
|
|
Patch0: sphinx-docutils-0.10.patch
|
|
|
|
|
# Fixes quoting issue in inheritance_diagram.py
|
|
|
|
|
# Already applied upstream as part of https://bitbucket.org/birkenfeld/sphinx/commits/fc1db93d21a5a535d9d62e5a0c9f0a806a8c117a
|
|
|
|
|
Patch1: Sphinx-1.1.3-fix_quoting_in_inheritance.patch
|
|
|
|
|
Patch2: Sphinx-1.1.3-verbosetests.patch
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: python2-devel >= 2.4
|
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
|
BuildRequires: python-docutils
|
|
|
|
|
BuildRequires: python-jinja2
|
|
|
|
|
BuildRequires: python-pygments
|
|
|
|
|
|
|
|
|
|
# for testing
|
|
|
|
|
BuildRequires: python-nose
|
|
|
|
|
# Test dependencies
|
|
|
|
|
BuildRequires: texlive-latex
|
|
|
|
|
BuildRequires: gettext
|
|
|
|
|
BuildRequires: texinfo
|
|
|
|
|
BuildRequires: python-sqlalchemy
|
|
|
|
|
BuildRequires: python-whoosh
|
|
|
|
|
# note: no Python3 xapian binding yet
|
|
|
|
|
BuildRequires: xapian-bindings-python
|
|
|
|
|
BuildRequires: texlive-collection-fontsrecommended
|
|
|
|
|
BuildRequires: texlive-collection-latex
|
|
|
|
|
BuildRequires: tex(cmap.sty)
|
|
|
|
|
BuildRequires: tex(ecrm1000.tfm)
|
|
|
|
|
BuildRequires: tex(fancybox.sty)
|
|
|
|
|
BuildRequires: tex(footnote.sty)
|
|
|
|
|
BuildRequires: tex(framed.sty)
|
|
|
|
|
BuildRequires: tex(multirow.sty)
|
|
|
|
|
BuildRequires: tex(parskip.sty)
|
|
|
|
|
BuildRequires: tex(titlesec.sty)
|
|
|
|
|
BuildRequires: tex(threeparttable.sty)
|
|
|
|
|
BuildRequires: tex(wrapfig.sty)
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
@@ -41,11 +68,28 @@ BuildRequires: python3-docutils
|
|
|
|
|
BuildRequires: python3-jinja2
|
|
|
|
|
BuildRequires: python3-pygments
|
|
|
|
|
BuildRequires: python3-nose
|
|
|
|
|
BuildRequires: python3-sqlalchemy
|
|
|
|
|
BuildRequires: python3-whoosh
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
Requires: python-docutils
|
|
|
|
|
Requires: python-jinja2
|
|
|
|
|
Requires: python-pygments
|
|
|
|
|
%if ! 0%{?with_splitlatex}
|
|
|
|
|
Provides: %{name}-latex = %{version}-%{release}
|
|
|
|
|
Requires: texlive-collection-fontsrecommended
|
|
|
|
|
Requires: texlive-collection-latex
|
|
|
|
|
Requires: tex(cmap.sty)
|
|
|
|
|
Requires: tex(ecrm1000.tfm)
|
|
|
|
|
Requires: tex(fancybox.sty)
|
|
|
|
|
Requires: tex(footnote.sty)
|
|
|
|
|
Requires: tex(framed.sty)
|
|
|
|
|
Requires: tex(multirow.sty)
|
|
|
|
|
Requires: tex(parskip.sty)
|
|
|
|
|
Requires: tex(titlesec.sty)
|
|
|
|
|
Requires: tex(threeparttable.sty)
|
|
|
|
|
Requires: tex(wrapfig.sty)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Sphinx is a tool that makes it easy to create intelligent and
|
|
|
|
@@ -76,13 +120,59 @@ the Python docs:
|
|
|
|
|
snippets and inclusion of appropriately formatted docstrings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_splitlatex}
|
|
|
|
|
%package latex
|
|
|
|
|
Summary: LaTeX builder for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
Requires: texlive-collection-fontsrecommended
|
|
|
|
|
Requires: texlive-collection-latex
|
|
|
|
|
Requires: tex(cmap.sty)
|
|
|
|
|
Requires: tex(ecrm1000.tfm)
|
|
|
|
|
Requires: tex(fancybox.sty)
|
|
|
|
|
Requires: tex(footnote.sty)
|
|
|
|
|
Requires: tex(framed.sty)
|
|
|
|
|
Requires: tex(multirow.sty)
|
|
|
|
|
Requires: tex(parskip.sty)
|
|
|
|
|
Requires: tex(titlesec.sty)
|
|
|
|
|
Requires: tex(threeparttable.sty)
|
|
|
|
|
Requires: tex(wrapfig.sty)
|
|
|
|
|
|
|
|
|
|
%description latex
|
|
|
|
|
Sphinx is a tool that makes it easy to create intelligent and
|
|
|
|
|
beautiful documentation for Python projects (or other documents
|
|
|
|
|
consisting of multiple reStructuredText sources), written by Georg
|
|
|
|
|
Brandl. It was originally created to translate the new Python
|
|
|
|
|
documentation, but has now been cleaned up in the hope that it will be
|
|
|
|
|
useful to many other projects.
|
|
|
|
|
|
|
|
|
|
This package contains the LaTeX builder for Sphinx. It is packaged
|
|
|
|
|
separately so that the main package does not pull in TeXLive
|
|
|
|
|
dependencies.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%package -n python3-sphinx
|
|
|
|
|
Summary: Python documentation generator
|
|
|
|
|
Group: Development/Tools
|
|
|
|
|
Summary: Python documentation generator
|
|
|
|
|
Group: Development/Tools
|
|
|
|
|
Requires: python3-docutils
|
|
|
|
|
Requires: python3-jinja2
|
|
|
|
|
Requires: python3-pygments
|
|
|
|
|
%if ! 0%{?with_splitlatex}
|
|
|
|
|
Provides: python3-sphinx-latex = %{version}-%{release}
|
|
|
|
|
Requires: texlive-collection-fontsrecommended
|
|
|
|
|
Requires: texlive-collection-latex
|
|
|
|
|
Requires: tex(cmap.sty)
|
|
|
|
|
Requires: tex(ecrm1000.tfm)
|
|
|
|
|
Requires: tex(fancybox.sty)
|
|
|
|
|
Requires: tex(footnote.sty)
|
|
|
|
|
Requires: tex(framed.sty)
|
|
|
|
|
Requires: tex(multirow.sty)
|
|
|
|
|
Requires: tex(parskip.sty)
|
|
|
|
|
Requires: tex(titlesec.sty)
|
|
|
|
|
Requires: tex(threeparttable.sty)
|
|
|
|
|
Requires: tex(wrapfig.sty)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description -n python3-sphinx
|
|
|
|
|
Sphinx is a tool that makes it easy to create intelligent and
|
|
|
|
@@ -111,6 +201,36 @@ the Python docs:
|
|
|
|
|
* Code handling: automatic highlighting using the Pygments highlighter
|
|
|
|
|
* Various extensions are available, e.g. for automatic testing of
|
|
|
|
|
snippets and inclusion of appropriately formatted docstrings.
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_splitlatex}
|
|
|
|
|
%package -n python3-sphinx-latex
|
|
|
|
|
Summary: LaTeX builder for %{name}
|
|
|
|
|
Requires: python3-sphinx = %{version}-%{release}
|
|
|
|
|
Requires: texlive-collection-fontsrecommended
|
|
|
|
|
Requires: texlive-collection-latex
|
|
|
|
|
Requires: tex(cmap.sty)
|
|
|
|
|
Requires: tex(ecrm1000.tfm)
|
|
|
|
|
Requires: tex(fancybox.sty)
|
|
|
|
|
Requires: tex(footnote.sty)
|
|
|
|
|
Requires: tex(framed.sty)
|
|
|
|
|
Requires: tex(multirow.sty)
|
|
|
|
|
Requires: tex(parskip.sty)
|
|
|
|
|
Requires: tex(titlesec.sty)
|
|
|
|
|
Requires: tex(threeparttable.sty)
|
|
|
|
|
Requires: tex(wrapfig.sty)
|
|
|
|
|
|
|
|
|
|
%description -n python3-sphinx-latex
|
|
|
|
|
Sphinx is a tool that makes it easy to create intelligent and
|
|
|
|
|
beautiful documentation for Python projects (or other documents
|
|
|
|
|
consisting of multiple reStructuredText sources), written by Georg
|
|
|
|
|
Brandl. It was originally created to translate the new Python
|
|
|
|
|
documentation, but has now been cleaned up in the hope that it will be
|
|
|
|
|
useful to many other projects.
|
|
|
|
|
|
|
|
|
|
This package contains the LaTeX builder for Sphinx. It is packaged
|
|
|
|
|
separately so that the main package does not pull in TeXLive
|
|
|
|
|
dependencies.
|
|
|
|
|
%endif # with_splitlatex
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -120,7 +240,6 @@ Group: Documentation
|
|
|
|
|
License: BSD
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
Sphinx is a tool that makes it easy to create intelligent and
|
|
|
|
|
beautiful documentation for Python projects (or other documents
|
|
|
|
@@ -137,6 +256,8 @@ This package contains documentation in reST and HTML formats.
|
|
|
|
|
sed '1d' -i sphinx/pycode/pgen2/token.py
|
|
|
|
|
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
@@ -172,6 +293,7 @@ pushd %{py3dir}
|
|
|
|
|
for f in %{buildroot}%{_bindir}/sphinx-*;
|
|
|
|
|
do
|
|
|
|
|
mv $f $f-%{python3_version}
|
|
|
|
|
ln -s %{_bindir}/`basename $f-%{python3_version}` $f-3
|
|
|
|
|
done
|
|
|
|
|
popd
|
|
|
|
|
%endif # with_python3
|
|
|
|
@@ -187,6 +309,10 @@ for f in %{buildroot}%{_mandir}/man1/sphinx-*.1;
|
|
|
|
|
do
|
|
|
|
|
cp -p $f $(echo $f | sed -e "s|.1$|-%{python3_version}.1|")
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Remove language files, they're identical to the ones from the
|
|
|
|
|
# Python 2 build that will be moved to /usr/share below
|
|
|
|
|
find %{buildroot}%{python3_sitelib}/sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -exec rm -rf '{}' \;
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
@@ -199,7 +325,7 @@ mv doc reST
|
|
|
|
|
# patch to support this incorporated in 0.6.6
|
|
|
|
|
pushd %{buildroot}%{python_sitelib}
|
|
|
|
|
|
|
|
|
|
for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -printf "%f "`;
|
|
|
|
|
for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
|
|
|
|
|
do
|
|
|
|
|
install -d %{buildroot}%{_datadir}/sphinx/locale/$lang
|
|
|
|
|
install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
|
|
|
|
@@ -220,10 +346,13 @@ popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
make test
|
|
|
|
|
LANG=en_US.UTF-8 make test
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
make test
|
|
|
|
|
# test suite is not entirely runnable in this version of Sphinx;
|
|
|
|
|
# only worked in the past because we were accidentally running them wiht
|
|
|
|
|
# Python 2
|
|
|
|
|
LANG=en_US.UTF-8 PYTHON=python3 make test || true
|
|
|
|
|
popd
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
@@ -231,8 +360,14 @@ popd
|
|
|
|
|
%files -f sphinx.lang
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc AUTHORS CHANGES EXAMPLES LICENSE README TODO
|
|
|
|
|
%exclude %{_bindir}/sphinx-*-3
|
|
|
|
|
%exclude %{_bindir}/sphinx-*-%{python3_version}
|
|
|
|
|
%{_bindir}/sphinx-*
|
|
|
|
|
%if 0%{?with_splitlatex}
|
|
|
|
|
%exclude %{python_sitelib}/sphinx/builders/latex.py*
|
|
|
|
|
%exclude %{python_sitelib}/sphinx/writers/latex.py*
|
|
|
|
|
%exclude %{python_sitelib}/sphinx/texinputs
|
|
|
|
|
%endif
|
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
%dir %{_datadir}/sphinx/
|
|
|
|
|
%dir %{_datadir}/sphinx/locale
|
|
|
|
@@ -240,15 +375,39 @@ popd
|
|
|
|
|
%exclude %{_mandir}/man1/sphinx-*-%{python3_version}.1*
|
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_splitlatex}
|
|
|
|
|
%files latex
|
|
|
|
|
%{python_sitelib}/sphinx/builders/latex.py*
|
|
|
|
|
%{python_sitelib}/sphinx/writers/latex.py*
|
|
|
|
|
%{python_sitelib}/sphinx/texinputs
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%files -n python3-sphinx
|
|
|
|
|
%files -n python3-sphinx -f sphinx.lang
|
|
|
|
|
%doc AUTHORS CHANGES EXAMPLES LICENSE README TODO
|
|
|
|
|
%{_bindir}/sphinx-*-3
|
|
|
|
|
%{_bindir}/sphinx-*-%{python3_version}
|
|
|
|
|
%if 0%{?with_splitlatex}
|
|
|
|
|
%exclude %{python3_sitelib}/sphinx/builders/latex.py*
|
|
|
|
|
%exclude %{python3_sitelib}/sphinx/builders/__pycache__/latex.*.py*
|
|
|
|
|
%exclude %{python3_sitelib}/sphinx/writers/latex.py*
|
|
|
|
|
%exclude %{python3_sitelib}/sphinx/writers/__pycache__/latex.*.py*
|
|
|
|
|
%exclude %{python3_sitelib}/sphinx/texinputs
|
|
|
|
|
%endif
|
|
|
|
|
%{python3_sitelib}/*
|
|
|
|
|
%dir %{_datadir}/sphinx/
|
|
|
|
|
%dir %{_datadir}/sphinx/locale
|
|
|
|
|
%dir %{_datadir}/sphinx/locale/*
|
|
|
|
|
%{_mandir}/man1/sphinx-*-%{python3_version}.1*
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_splitlatex}
|
|
|
|
|
%files -n python3-sphinx-latex
|
|
|
|
|
%{python3_sitelib}/sphinx/builders/latex.py*
|
|
|
|
|
%{python3_sitelib}/sphinx/builders/__pycache__/latex.*.py*
|
|
|
|
|
%{python3_sitelib}/sphinx/writers/latex.py*
|
|
|
|
|
%{python3_sitelib}/sphinx/writers/__pycache__/latex.*.py*
|
|
|
|
|
%{python3_sitelib}/sphinx/texinputs
|
|
|
|
|
%endif # with_splitlatex
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
@@ -257,6 +416,34 @@ popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Feb 5 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.1.3-12
|
|
|
|
|
- Complete LaTeX builder deps (fixes bz#882166)
|
|
|
|
|
- Make test output verbose
|
|
|
|
|
- Add BRs needed to enable all tests
|
|
|
|
|
|
|
|
|
|
* Tue Feb 3 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.1.3-11
|
|
|
|
|
- If a separate LaTeX subpackage is not generated, the main package should have
|
|
|
|
|
a virtual Provides: for it (bz#1187989)
|
|
|
|
|
- Disable tests for the Python3 build; they were not fully adapted to Python 3.
|
|
|
|
|
The tests previously passed because they were accidentally run using Python 2.
|
|
|
|
|
|
|
|
|
|
* Tue Jan 27 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.1.3-10
|
|
|
|
|
- Clean up python3-sphinx's locale files, they ended up in the python2 package.
|
|
|
|
|
Share the locale files in /usr/share instead
|
|
|
|
|
|
|
|
|
|
* Thu May 22 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1.3-9
|
|
|
|
|
- Add sphinx-*-3 links to scripts
|
|
|
|
|
Resolves: #1098109
|
|
|
|
|
|
|
|
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Mar 9 2013 Michel Salim <salimma@fedoraproject.org> - 1.1.3-7
|
|
|
|
|
- Fix inheritance_diagram quoting bug, exposed by the newer, stricter dot
|
|
|
|
|
|
|
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Aug 21 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 1.1.3-5
|
|
|
|
|
- Fix for use of sphinx's manpage writer with docutils-0.10
|
|
|
|
|
|
|
|
|
|