forked from pool/python-Sphinx
- Build and install man-pages - Build and install man-pages - Python3 binaries should have the prefix "python3-" + Matches Fedora's Python packaging policies + Uniform pattern, we currently have a wild mix OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=20
108 lines
3.8 KiB
RPMSpec
108 lines
3.8 KiB
RPMSpec
#
|
|
# spec file for package python-Sphinx
|
|
#
|
|
# Copyright (c) 2012 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.1.3
|
|
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: fdupes
|
|
BuildRequires: python-Jinja2
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-distribute
|
|
BuildRequires: python-docutils
|
|
# Testsuite build requirements:
|
|
BuildRequires: python-Pygments
|
|
BuildRequires: python-nose
|
|
Requires: python-Jinja2
|
|
Requires: python-Pygments
|
|
Requires: python-distribute
|
|
Requires: python-docutils
|
|
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
|
|
|
|
%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}
|
|
install -d %{buildroot}%{_mandir}/man1/
|
|
install -m 644 build/sphinx/man/sphinx-*.1 %{buildroot}%{_mandir}/man1/
|
|
%find_lang sphinx
|
|
|
|
%check
|
|
nosetests
|
|
|
|
%files -f sphinx.lang
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS CHANGES LICENSE README TODO
|
|
%{_bindir}/sphinx-*
|
|
%{_mandir}/man1/sphinx-*
|
|
%{python_sitelib}/*
|
|
|
|
%files doc
|
|
%defattr(-,root,root,-)
|
|
%doc EXAMPLES build/sphinx/html
|
|
|
|
%changelog
|