# # spec file for package python-Sphinx-doc # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # 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. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?suse_version} != 1315 %bcond_without latex %else %bcond_with latex %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Sphinx-doc Version: 1.6.3 Release: 0 Url: http://sphinx-doc.org Summary: Documentation for python-Sphinx License: BSD-2-Clause Group: Documentation/Other Source: https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz Patch1: disable-test.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes BuildRequires: python3-Sphinx %if %{with latex} BuildRequires: python3-Sphinx-latex %endif BuildRequires: python-rpm-macros Recommends: %{name}-html = %{version} BuildArch: noarch %python_subpackages %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. This package contained the documentation for Sphinx. %package man Summary: Man files for python-Sphinx Group: Documentation/Man Requires: python-Sphinx = %{version} Requires: %{name}-man-common = %{version} Requires(post): update-alternatives Requires(postun): update-alternatives %description man 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 contained the manual pages for the Sphinx executables. %package -n %{name}-html Summary: HTML Documentation for python-Sphinx Group: Documentation/HTML Provides: %{python_module Sphinx-doc-html = %{version}} %description -n %{name}-html 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 contained the HTML documentation for Sphinx. %package -n %{name}-man-common Summary: Man files for python-Sphinx - python-independent versions Group: Documentation/Man Provides: %{python_module Sphinx-doc-man-common = %{version}} %description -n %{name}-man-common 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 contained the python version-independent manual pages for the Sphinx executables. %prep %setup -q -n Sphinx-%{version} %patch1 -p1 %build # build documentation %{_python_use_flavor python3} mkdir build.doc %__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo %__python3 setup.py build_sphinx -b man mv build/sphinx/{html,man} build.doc/ %install install -d %{buildroot}%{_docdir}/python-Sphinx/ install -d %{buildroot}%{_mandir}/man1/ mv build.doc/html %{buildroot}%{_docdir}/python-Sphinx/ mv build.doc/man/sphinx-all.1 %{buildroot}%{_mandir}/man1/sphinx-all.1 mv build.doc/man/sphinx-apidoc.1 %{buildroot}%{_mandir}/man1/sphinx-apidoc.1 mv build.doc/man/sphinx-build.1 %{buildroot}%{_mandir}/man1/sphinx-build.1 mv build.doc/man/sphinx-quickstart.1 %{buildroot}%{_mandir}/man1/sphinx-quickstart.1 %python_clone %{buildroot}%{_mandir}/man1/sphinx-all.1 %python_clone %{buildroot}%{_mandir}/man1/sphinx-apidoc.1 %python_clone %{buildroot}%{_mandir}/man1/sphinx-build.1 %python_clone %{buildroot}%{_mandir}/man1/sphinx-quickstart.1 %files %{python_files} %defattr(-,root,root,-) %doc AUTHORS LICENSE EXAMPLES %files %{python_files man} %defattr(-,root,root,-) %doc AUTHORS LICENSE %{_mandir}/man1/sphinx-all-%{python_bin_suffix}.1%ext_man %{_mandir}/man1/sphinx-apidoc-%{python_bin_suffix}.1%ext_man %{_mandir}/man1/sphinx-build-%{python_bin_suffix}.1%ext_man %{_mandir}/man1/sphinx-quickstart-%{python_bin_suffix}.1%ext_man %files -n %{name}-html %defattr(-,root,root,-) %doc AUTHORS LICENSE %dir %{_docdir}/python-Sphinx/ %{_docdir}/python-Sphinx/html/ %files -n %{name}-man-common %defattr(-,root,root,-) %doc AUTHORS LICENSE %{_mandir}/man1/sphinx-all.1%ext_man %{_mandir}/man1/sphinx-apidoc.1%ext_man %{_mandir}/man1/sphinx-build.1%ext_man %{_mandir}/man1/sphinx-quickstart.1%ext_man %changelog