1
0
forked from pool/python-Sphinx
python-Sphinx/python-Sphinx.spec
Denisart Benjamin fe00a967aa Accepting request 224882 from home:Nijel:branches:devel:languages:python
- Update to 1.2.2:
  - PR#211: When checking for existence of the html_logo file, check the full
    relative path and not the basename.
  - PR#212: Fix traceback with autodoc and __init__ methods without docstring.
  - PR#213: Fix a missing import in the setup command.
  - #1357: Option names documented by option are now again allowed to not start
    with a dash or slash, and referencing them will work correctly.
  - #1358: Fix handling of image paths outside of the source directory when
    using the “wildcard” style reference.
  - #1374: Fix for autosummary generating overly-long summaries if first line
    doesn’t end with a period.
  - #1383: Fix Python 2.5 compatibility of sphinx-apidoc.
  - #1391: Actually prevent using “pngmath” and “mathjax” extensions at the
    same time in sphinx-quickstart.
  - #1386: Fix bug preventing more than one theme being added by the entry
    point mechanism.
  - #1370: Ignore “toctree” nodes in text writer, instead of raising.
  - #1364: Fix ‘make gettext’ fails when the ‘.. todolist::’ directive is
    present.
  - #1367: Fix a change of PR#96 that break
    sphinx.util.docfields.Field.make_field interface/behavior for item argument
    usage.

OBS-URL: https://build.opensuse.org/request/show/224882
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=51
2014-03-06 18:01:31 +00:00

160 lines
6.4 KiB
RPMSpec

#
# spec file for package python-Sphinx
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#
Name: python-Sphinx
Version: 1.2.2
Release: 0
Url: http://sphinx.pocoo.org
Summary: Python documentation generator
License: BSD-2-Clause
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
BuildRequires: python-setuptools
# Documentation requirements:
BuildRequires: python-Jinja2 >= 2.3
BuildRequires: python-docutils >= 0.7
# Testsuite requirements:
BuildRequires: python-Pygments >= 1.2
BuildRequires: python-nose
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires: python-Jinja2 >= 2.3
Requires: python-Pygments >= 1.2
Requires: python-docutils >= 0.7
Suggests: python-rst2pdf
Provides: python-sphinx = %{version}
Obsoletes: python-sphinx < %{version}
%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
%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.
%prep
%setup -q -n Sphinx-%{version}
sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning
# 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
%build
python setup.py build
python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
python setup.py build_sphinx -b man
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for B in apidoc autogen build quickstart ; do
touch %{buildroot}%{_sysconfdir}/alternatives/sphinx-$B
ln -sf %{_sysconfdir}/alternatives/sphinx-$B %{buildroot}/%{_bindir}/sphinx-$B
done
install -d %{buildroot}%{_mandir}/man1/
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
touch %{buildroot}%{_sysconfdir}/alternatives/sphinx-$M.1.gz
ln -sf %{_sysconfdir}/alternatives/sphinx-$M.1.gz %{buildroot}%{_mandir}/man1/sphinx-$M.1.gz
done
%find_lang sphinx
%check
PYTHONPATH=$PWD make test
%post
update-alternatives \
--install %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py_ver} 20 \
--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} \
--slave %{_mandir}/man1/sphinx-all.1.gz sphinx-all.1 %{_mandir}/sphinx-all-%{py_ver}.1.gz \
--slave %{_mandir}/man1/sphinx-apidoc.1.gz sphinx-apidoc.1 %{_mandir}/sphinx-apidoc-%{py_ver}.1.gz \
--slave %{_mandir}/man1/sphinx-build.1.gz sphinx-build.1 %{_mandir}/sphinx-build-%{py_ver}.1.gz \
--slave %{_mandir}/man1/sphinx-quickstart.1.gz sphinx-quickstart.1 %{_mandir}/sphinx-quickstart-%{py_ver}.1.gz \
%postun
if [ $1 -eq 0 ] ; then
update-alternatives --remove sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py_ver}
fi
%files -f sphinx.lang
%defattr(-,root,root,-)
%doc AUTHORS CHANGES LICENSE README.rst
%{_bindir}/sphinx-apidoc
%{_bindir}/sphinx-apidoc-%{py_ver}
%{_bindir}/sphinx-autogen
%{_bindir}/sphinx-autogen-%{py_ver}
%{_bindir}/sphinx-build
%{_bindir}/sphinx-build-%{py_ver}
%{_bindir}/sphinx-quickstart
%{_bindir}/sphinx-quickstart-%{py_ver}
%{_mandir}/man1/sphinx-all.1.gz
%{_mandir}/man1/sphinx-all-%{py_ver}.1.gz
%{_mandir}/man1/sphinx-apidoc.1.gz
%{_mandir}/man1/sphinx-apidoc-%{py_ver}.1.gz
%{_mandir}/man1/sphinx-build.1.gz
%{_mandir}/man1/sphinx-build-%{py_ver}.1.gz
%{_mandir}/man1/sphinx-quickstart.1.gz
%{_mandir}/man1/sphinx-quickstart-%{py_ver}.1.gz
%{python_sitelib}/sphinx/
%{python_sitelib}/Sphinx-%{version}-py%{py_ver}.egg-info
%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
%files doc
%defattr(-,root,root,-)
%doc EXAMPLES build/sphinx/html
%changelog