2011-07-03 13:34:40 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-Sphinx
|
|
|
|
#
|
2015-07-27 16:32:26 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-07-03 13:34:40 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2011-07-04 12:44:36 +02:00
|
|
|
|
2011-07-03 13:34:40 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-07-04 12:44:36 +02:00
|
|
|
|
2011-07-03 13:34:40 +02:00
|
|
|
Name: python-Sphinx
|
2016-01-25 18:43:52 +01:00
|
|
|
Version: 1.3.5
|
2011-09-22 12:59:46 +02:00
|
|
|
Release: 0
|
2015-12-17 14:38:15 +01:00
|
|
|
Url: http://sphinx-doc.org
|
2011-07-03 13:34:40 +02:00
|
|
|
Summary: Python documentation generator
|
2011-09-22 12:59:46 +02:00
|
|
|
License: BSD-2-Clause
|
2011-07-03 13:34:40 +02:00
|
|
|
Group: Development/Languages/Python
|
|
|
|
Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: python-devel
|
2013-10-24 13:14:56 +02:00
|
|
|
BuildRequires: python-setuptools
|
2013-04-30 16:38:55 +02:00
|
|
|
# Documentation requirements:
|
2015-04-13 15:33:30 +02:00
|
|
|
BuildRequires: python-Babel
|
2013-11-06 12:47:17 +01:00
|
|
|
BuildRequires: python-Jinja2 >= 2.3
|
2015-04-13 15:33:30 +02:00
|
|
|
BuildRequires: python-alabaster
|
2013-11-06 12:47:17 +01:00
|
|
|
BuildRequires: python-docutils >= 0.7
|
2015-04-13 15:33:30 +02:00
|
|
|
BuildRequires: python-mock
|
2015-07-29 15:26:03 +02:00
|
|
|
BuildRequires: python-six >= 1.4
|
2015-04-13 15:33:30 +02:00
|
|
|
BuildRequires: python-snowballstemmer
|
|
|
|
BuildRequires: python-sphinx_rtd_theme
|
2013-04-30 16:38:55 +02:00
|
|
|
# Testsuite requirements:
|
2016-01-25 18:43:52 +01:00
|
|
|
BuildRequires: python-Pygments >= 2.1
|
2012-11-20 18:27:36 +01:00
|
|
|
BuildRequires: python-nose
|
2013-04-30 16:38:55 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2015-04-13 15:33:30 +02:00
|
|
|
Requires: python-Babel
|
2013-11-06 12:47:17 +01:00
|
|
|
Requires: python-Jinja2 >= 2.3
|
2015-04-13 15:33:30 +02:00
|
|
|
Requires: python-Pygments >= 2.0
|
|
|
|
Requires: python-alabaster
|
|
|
|
Requires: python-docutils >= 0.11
|
2015-07-29 15:26:03 +02:00
|
|
|
Requires: python-six >= 1.4
|
2015-04-13 15:33:30 +02:00
|
|
|
Requires: python-snowballstemmer
|
|
|
|
Requires: python-sphinx_rtd_theme
|
2015-09-09 09:25:00 +02:00
|
|
|
|
2015-07-27 16:32:26 +02:00
|
|
|
%if 0%{?suse_version}
|
2015-06-29 16:14:41 +02:00
|
|
|
Recommends: python-rst2pdf
|
2015-07-27 16:32:26 +02:00
|
|
|
%endif
|
|
|
|
# workaround for suboptimal CentOS-7 project config
|
|
|
|
#!BuildIgnore: texinfo
|
|
|
|
|
2011-07-03 13:34:40 +02:00
|
|
|
Provides: python-sphinx = %{version}
|
|
|
|
Obsoletes: python-sphinx < %{version}
|
2012-11-12 11:25:50 +01:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
2011-07-03 13:34:40 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
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
|
|
|
|
for the new Python documentation, and has excellent facilities for Python
|
|
|
|
project documentation, but C/C++ is supported as well, and more languages are
|
|
|
|
planned.
|
|
|
|
|
|
|
|
Sphinx uses reStructuredText as its markup language, and many of its strengths
|
|
|
|
come from the power and straightforwardness of reStructuredText and its parsing
|
|
|
|
and translating suite, the Docutils.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
Group: Documentation/Other
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
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
|
|
|
|
for the new Python documentation, and has excellent facilities for Python
|
|
|
|
project documentation, but C/C++ is supported as well, and more languages are
|
|
|
|
planned.
|
|
|
|
|
|
|
|
Sphinx uses reStructuredText as its markup language, and many of its strengths
|
|
|
|
come from the power and straightforwardness of reStructuredText and its parsing
|
|
|
|
and translating suite, the Docutils.
|
|
|
|
|
2015-09-09 09:25:00 +02:00
|
|
|
%package latex
|
|
|
|
Summary: Sphinx packages for LaTeX
|
|
|
|
Group: Productivity/Publishing/TeX/Base
|
|
|
|
Requires: texlive-latex
|
|
|
|
Requires: texlive-metafont
|
|
|
|
Requires: texlive-pdftex
|
|
|
|
Requires: tex(article.cls)
|
|
|
|
Requires: tex(pdftex.def)
|
|
|
|
Requires: tex(utf8.def)
|
|
|
|
Requires: tex(utf8x.def)
|
|
|
|
Requires: tex(8r.enc)
|
|
|
|
Requires: tex(english.ldf)
|
|
|
|
Requires: tex(pdftex.map)
|
|
|
|
Requires: tex(alltt.sty)
|
|
|
|
Requires: tex(amsfonts.sty)
|
|
|
|
Requires: tex(amsmath.sty)
|
|
|
|
Requires: tex(amssymb.sty)
|
|
|
|
Requires: tex(amsthm.sty)
|
|
|
|
Requires: tex(array.sty)
|
|
|
|
Requires: tex(atbegshi.sty)
|
|
|
|
Requires: tex(babel.sty)
|
|
|
|
Requires: tex(bm.sty)
|
|
|
|
Requires: tex(cmap.sty)
|
|
|
|
Requires: tex(color.sty)
|
|
|
|
Requires: tex(colortbl.sty)
|
|
|
|
Requires: tex(dvipdfmx.def)
|
|
|
|
Requires: tex(fancybox.sty)
|
|
|
|
Requires: tex(fancyhdr.sty)
|
|
|
|
Requires: tex(fancyvrb.sty)
|
|
|
|
Requires: tex(float.sty)
|
|
|
|
Requires: tex(fncychap.sty)
|
|
|
|
Requires: tex(fontenc.sty)
|
|
|
|
Requires: tex(footnote.sty)
|
|
|
|
Requires: tex(framed.sty)
|
|
|
|
Requires: tex(graphics.sty)
|
|
|
|
Requires: tex(graphicx.sty)
|
|
|
|
Requires: tex(hypcap.sty)
|
|
|
|
Requires: tex(hyperref.sty)
|
|
|
|
Requires: tex(ifthen.sty)
|
|
|
|
Requires: tex(inputenc.sty)
|
|
|
|
Requires: tex(longtable.sty)
|
|
|
|
Requires: tex(makeidx.sty)
|
|
|
|
Requires: tex(multirow.sty)
|
|
|
|
Requires: tex(palatino.sty)
|
|
|
|
Requires: tex(parskip.sty)
|
|
|
|
Requires: tex(preview.sty)
|
|
|
|
Requires: tex(tabulary.sty)
|
|
|
|
Requires: tex(textcomp.sty)
|
|
|
|
Requires: tex(threeparttable.sty)
|
|
|
|
Requires: tex(times.sty)
|
|
|
|
Requires: tex(titlesec.sty)
|
|
|
|
Requires: tex(upquote.sty)
|
|
|
|
Requires: tex(wrapfig.sty)
|
|
|
|
Requires: tex(pcrr.tfm)
|
|
|
|
Requires: tex(phvr.tfm)
|
|
|
|
Requires: tex(pplr.tfm)
|
|
|
|
Requires: tex(ptmr.tfm)
|
|
|
|
Requires: tex(pzcmi.tfm)
|
|
|
|
|
|
|
|
%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
|
|
|
|
for the new Python documentation, and has excellent facilities for Python
|
|
|
|
project documentation, but C/C++ is supported as well, and more languages are
|
|
|
|
planned.
|
|
|
|
|
|
|
|
Sphinx uses reStructuredText as its markup language, and many of its strengths
|
|
|
|
come from the power and straightforwardness of reStructuredText and its parsing
|
|
|
|
and translating suite, the Docutils.
|
|
|
|
|
|
|
|
This package contains the LaTeX components for %{name}.
|
|
|
|
|
2011-07-03 13:34:40 +02:00
|
|
|
%prep
|
|
|
|
%setup -q -n Sphinx-%{version}
|
2012-11-12 11:25:50 +01:00
|
|
|
sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning
|
2013-05-16 12:30:52 +02:00
|
|
|
# Add Interpreter version suffix to entrypoints (and thus /usr/bin binaries) to
|
|
|
|
# allow for update-alternatives later on:
|
|
|
|
sed -i 's/\(sphinx-.*\) =/\1-%{py_ver} =/' setup.py
|
2014-09-09 19:03:22 +02:00
|
|
|
# Fix wrong end-of-line encoding
|
|
|
|
sed -i 's/\r$//' sphinx/themes/basic/static/jquery.js
|
2011-07-03 13:34:40 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
2012-11-20 18:27:36 +01:00
|
|
|
python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
|
|
|
|
python setup.py build_sphinx -b man
|
2011-07-03 13:34:40 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2014-02-11 15:17:09 +01:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
2013-04-30 16:38:55 +02:00
|
|
|
for B in apidoc autogen build quickstart ; do
|
2014-02-11 15:17:09 +01:00
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/sphinx-$B
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/sphinx-$B %{buildroot}/%{_bindir}/sphinx-$B
|
2013-04-30 16:38:55 +02:00
|
|
|
done
|
2012-11-20 18:27:36 +01:00
|
|
|
install -d %{buildroot}%{_mandir}/man1/
|
2013-04-30 16:38:55 +02:00
|
|
|
for M in all apidoc build quickstart ; do
|
|
|
|
install -m 644 build/sphinx/man/sphinx-$M.1 %{buildroot}%{_mandir}/man1/sphinx-$M-%{py_ver}.1
|
2014-02-11 15:17:09 +01:00
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/sphinx-$M.1.gz
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/sphinx-$M.1.gz %{buildroot}%{_mandir}/man1/sphinx-$M.1.gz
|
2013-04-30 16:38:55 +02:00
|
|
|
done
|
2011-07-03 13:34:40 +02:00
|
|
|
%find_lang sphinx
|
|
|
|
|
2012-11-20 18:27:36 +01:00
|
|
|
%check
|
2013-11-06 12:47:17 +01:00
|
|
|
PYTHONPATH=$PWD make test
|
2012-11-20 18:27:36 +01:00
|
|
|
|
2013-04-30 16:38:55 +02:00
|
|
|
%post
|
|
|
|
update-alternatives \
|
2013-05-16 12:30:52 +02:00
|
|
|
--install %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py_ver} 20 \
|
2013-04-30 16:38:55 +02:00
|
|
|
--slave %{_bindir}/sphinx-build sphinx-build %{_bindir}/sphinx-build-%{py_ver} \
|
|
|
|
--slave %{_bindir}/sphinx-autogen sphinx-autogen %{_bindir}/sphinx-autogen-%{py_ver} \
|
|
|
|
--slave %{_bindir}/sphinx-quickstart sphinx-quickstart %{_bindir}/sphinx-quickstart-%{py_ver} \
|
2015-06-29 16:14:41 +02:00
|
|
|
--slave %{_mandir}/man1/sphinx-all.1.gz sphinx-all.1 %{_mandir}/man1/sphinx-all-%{py_ver}.1.gz \
|
|
|
|
--slave %{_mandir}/man1/sphinx-apidoc.1.gz sphinx-apidoc.1 %{_mandir}/man1/sphinx-apidoc-%{py_ver}.1.gz \
|
|
|
|
--slave %{_mandir}/man1/sphinx-build.1.gz sphinx-build.1 %{_mandir}/man1/sphinx-build-%{py_ver}.1.gz \
|
|
|
|
--slave %{_mandir}/man1/sphinx-quickstart.1.gz sphinx-quickstart.1 %{_mandir}/man1/sphinx-quickstart-%{py_ver}.1.gz \
|
2013-04-30 16:38:55 +02:00
|
|
|
|
2014-02-11 15:17:09 +01:00
|
|
|
%postun
|
2013-04-30 16:38:55 +02:00
|
|
|
if [ $1 -eq 0 ] ; then
|
2013-11-18 10:06:15 +01:00
|
|
|
update-alternatives --remove sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py_ver}
|
2013-04-30 16:38:55 +02:00
|
|
|
fi
|
|
|
|
|
2011-07-03 13:34:40 +02:00
|
|
|
%files -f sphinx.lang
|
|
|
|
%defattr(-,root,root,-)
|
2013-11-06 12:47:17 +01:00
|
|
|
%doc AUTHORS CHANGES LICENSE README.rst
|
2014-02-11 15:17:09 +01:00
|
|
|
%{_bindir}/sphinx-apidoc
|
2013-04-30 16:38:55 +02:00
|
|
|
%{_bindir}/sphinx-apidoc-%{py_ver}
|
2014-02-11 15:17:09 +01:00
|
|
|
%{_bindir}/sphinx-autogen
|
2013-04-30 16:38:55 +02:00
|
|
|
%{_bindir}/sphinx-autogen-%{py_ver}
|
2014-02-11 15:17:09 +01:00
|
|
|
%{_bindir}/sphinx-build
|
2013-04-30 16:38:55 +02:00
|
|
|
%{_bindir}/sphinx-build-%{py_ver}
|
2014-02-11 15:17:09 +01:00
|
|
|
%{_bindir}/sphinx-quickstart
|
2013-04-30 16:38:55 +02:00
|
|
|
%{_bindir}/sphinx-quickstart-%{py_ver}
|
2014-02-11 15:17:09 +01:00
|
|
|
%{_mandir}/man1/sphinx-all.1.gz
|
2013-04-30 16:38:55 +02:00
|
|
|
%{_mandir}/man1/sphinx-all-%{py_ver}.1.gz
|
2014-02-11 15:17:09 +01:00
|
|
|
%{_mandir}/man1/sphinx-apidoc.1.gz
|
2013-04-30 16:38:55 +02:00
|
|
|
%{_mandir}/man1/sphinx-apidoc-%{py_ver}.1.gz
|
2014-02-11 15:17:09 +01:00
|
|
|
%{_mandir}/man1/sphinx-build.1.gz
|
2013-04-30 16:38:55 +02:00
|
|
|
%{_mandir}/man1/sphinx-build-%{py_ver}.1.gz
|
2014-02-11 15:17:09 +01:00
|
|
|
%{_mandir}/man1/sphinx-quickstart.1.gz
|
2013-04-30 16:38:55 +02:00
|
|
|
%{_mandir}/man1/sphinx-quickstart-%{py_ver}.1.gz
|
2013-09-16 11:26:51 +02:00
|
|
|
%{python_sitelib}/sphinx/
|
2015-09-09 09:25:00 +02:00
|
|
|
%if 0%{?suse_version} && ( 0%{?suse_version} != 1315 && 0%{?suse_version} > 1110 )
|
|
|
|
%exclude %{python_sitelib}/sphinx/texinputs/
|
|
|
|
%endif
|
2013-04-30 16:38:55 +02:00
|
|
|
%{python_sitelib}/Sphinx-%{version}-py%{py_ver}.egg-info
|
2013-11-15 13:17:49 +01:00
|
|
|
%ghost %{_sysconfdir}/alternatives/sphinx-apidoc
|
|
|
|
%ghost %{_sysconfdir}/alternatives/sphinx-autogen
|
|
|
|
%ghost %{_sysconfdir}/alternatives/sphinx-build
|
|
|
|
%ghost %{_sysconfdir}/alternatives/sphinx-quickstart
|
|
|
|
%ghost %{_sysconfdir}/alternatives/sphinx-all.1.gz
|
|
|
|
%ghost %{_sysconfdir}/alternatives/sphinx-apidoc.1.gz
|
|
|
|
%ghost %{_sysconfdir}/alternatives/sphinx-build.1.gz
|
|
|
|
%ghost %{_sysconfdir}/alternatives/sphinx-quickstart.1.gz
|
2011-07-03 13:34:40 +02:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root,-)
|
2012-11-20 18:27:36 +01:00
|
|
|
%doc EXAMPLES build/sphinx/html
|
2011-07-03 13:34:40 +02:00
|
|
|
|
2015-09-09 09:25:00 +02:00
|
|
|
# Requirements are not available on SLES
|
|
|
|
%if 0%{?suse_version} && ( 0%{?suse_version} != 1315 && 0%{?suse_version} > 1110 )
|
|
|
|
%files latex
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc AUTHORS LICENSE
|
|
|
|
%{python_sitelib}/sphinx/texinputs/
|
|
|
|
%endif
|
|
|
|
|
2011-07-03 13:34:40 +02:00
|
|
|
%changelog
|