Split off LaTeX builder into its own subpackages, to remove TeXLive
dependencies from the main package. Thanks to Robert Kuska <rkuska@redhat.com> for feedback - Clean up python3-sphinx's locale files, they ended up in the python2 package. Share the locale files in /usr/share instead
This commit is contained in:
parent
a03e9aa1fb
commit
ca203d689b
1 changed files with 76 additions and 5 deletions
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
Name: python-sphinx
|
||||
Version: 1.1.3
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Summary: Python documentation generator
|
||||
|
||||
Group: Development/Tools
|
||||
|
|
@ -79,6 +79,27 @@ the Python docs:
|
|||
snippets and inclusion of appropriately formatted docstrings.
|
||||
|
||||
|
||||
%package latex
|
||||
Summary: LaTeX builder for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: texlive-framed
|
||||
Requires: texlive-threeparttable
|
||||
Requires: texlive-titlesec
|
||||
Requires: texlive-wrapfig
|
||||
|
||||
%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.
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-sphinx
|
||||
Summary: Python documentation generator
|
||||
|
|
@ -114,6 +135,26 @@ 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.
|
||||
|
||||
%package -n python3-sphinx-latex
|
||||
Summary: LaTeX builder for %{name}
|
||||
Requires: python3-sphinx = %{version}-%{release}
|
||||
Requires: texlive-framed
|
||||
Requires: texlive-threeparttable
|
||||
Requires: texlive-titlesec
|
||||
Requires: texlive-wrapfig
|
||||
|
||||
%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_python3
|
||||
|
||||
|
||||
|
|
@ -123,7 +164,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
|
||||
|
|
@ -192,6 +232,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
|
||||
|
||||
|
|
@ -204,7 +248,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
|
||||
|
|
@ -228,7 +272,7 @@ popd
|
|||
make test
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
make test
|
||||
PYTHON=python3 make test
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
|
|
@ -239,6 +283,9 @@ popd
|
|||
%exclude %{_bindir}/sphinx-*-3
|
||||
%exclude %{_bindir}/sphinx-*-%{python3_version}
|
||||
%{_bindir}/sphinx-*
|
||||
%exclude %{python_sitelib}/sphinx/builders/latex.py*
|
||||
%exclude %{python_sitelib}/sphinx/writers/latex.py*
|
||||
%exclude %{python_sitelib}/sphinx/texinputs
|
||||
%{python_sitelib}/*
|
||||
%dir %{_datadir}/sphinx/
|
||||
%dir %{_datadir}/sphinx/locale
|
||||
|
|
@ -246,16 +293,33 @@ popd
|
|||
%exclude %{_mandir}/man1/sphinx-*-%{python3_version}.1*
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%files latex
|
||||
%{python_sitelib}/sphinx/builders/latex.py*
|
||||
%{python_sitelib}/sphinx/writers/latex.py*
|
||||
%{python_sitelib}/sphinx/texinputs
|
||||
|
||||
%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}
|
||||
%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
|
||||
%{python3_sitelib}/*
|
||||
%dir %{_datadir}/sphinx/
|
||||
%dir %{_datadir}/sphinx/locale
|
||||
%dir %{_datadir}/sphinx/locale/*
|
||||
%{_mandir}/man1/sphinx-*-%{python3_version}.1*
|
||||
|
||||
%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_python3
|
||||
|
||||
%files doc
|
||||
|
|
@ -264,6 +328,13 @@ popd
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Jan 22 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.1.3-10
|
||||
- Split off LaTeX builder into its own subpackages, to remove TeXLive
|
||||
dependencies from the main package.
|
||||
Thanks to Robert Kuska <rkuska@redhat.com> for feedback
|
||||
- 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue