forked from pool/python-Sphinx
Accepting request 179712 from devel:languages:python
housekeeping sr, necessary due to split between d:l:p and d:l:p3 and (manual) _link removal in Factory. OBS-URL: https://build.opensuse.org/request/show/179712 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Sphinx?expand=0&rev=19
This commit is contained in:
commit
27afe604cf
@ -1,12 +0,0 @@
|
||||
diff -ruN ./sphinx/domains/cpp.py ../Sphinx-1.1.3.p3k/sphinx/domains/cpp.py
|
||||
--- ./sphinx/domains/cpp.py 2012-01-29 17:49:09.000000000 +0900
|
||||
+++ ../Sphinx-1.1.3.p3k/sphinx/domains/cpp.py 2012-05-24 00:41:06.524526456 +0900
|
||||
@@ -162,7 +162,7 @@
|
||||
raise NotImplementedError()
|
||||
|
||||
def __str__(self):
|
||||
- return unicode(self).encode('utf-8')
|
||||
+ return self.__unicode__()
|
||||
|
||||
def __unicode__(self):
|
||||
raise NotImplementedError()
|
@ -1,34 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 16 10:33:34 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Fix update-alternatives and support upgrade from previous versions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 7 08:16:04 UTC 2013 - highwaystar.ru@gmail.com
|
||||
|
||||
- fix building under openSUSE 12.1, 12.2:
|
||||
BuildRequires: python3-2to3 should be explicitly stated
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 30 14:38:39 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Apply update-alternatives for binaries and man-pages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 20 17:24:58 UTC 2012 - saschpe@suse.de
|
||||
|
||||
- Build and install man-pages
|
||||
- Name Python3 binaries consistently:
|
||||
+ Fix in setup.py to have correct egg-info data
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 6 00:24:32 UTC 2012 - saschpe@suse.de
|
||||
|
||||
- Remove obsolete SUSE version checks
|
||||
- Don't package locale files twice
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 23 16:02:39 UTC 2012 - highwaystar.ru@gmail.com
|
||||
|
||||
- python3-Sphinx package added
|
||||
|
@ -1,162 +0,0 @@
|
||||
#
|
||||
# spec file for package python3-Sphinx
|
||||
#
|
||||
# Copyright (c) 2013 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: python3-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
|
||||
Patch0: python3-Sphinx-docs.patch
|
||||
BuildRequires: python3-2to3
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-distribute
|
||||
# Documentation requirements:
|
||||
BuildRequires: python3-Jinja2
|
||||
BuildRequires: python3-docutils
|
||||
# Testsuite requirements:
|
||||
BuildRequires: python3-Pygments
|
||||
BuildRequires: python3-nose
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires: python3-Jinja2
|
||||
Requires: python3-Pygments
|
||||
Requires: python3-distribute
|
||||
Requires: python3-docutils
|
||||
Suggests: python3-rst2pdf
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%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}
|
||||
%patch0
|
||||
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-%{py3_ver} =|" setup.py # Add Python version suffix to binaries
|
||||
sed -i "s|'\(sphinx-[a-z]*\)'|'\1-%{py3_ver}'|" doc/conf.py # Do the same for man-pages
|
||||
|
||||
%build
|
||||
2to3 . -w --nobackups
|
||||
python3 setup.py build
|
||||
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo # Build HTML documentation
|
||||
python3 setup.py build_sphinx -b man # Build man-pages
|
||||
|
||||
%install
|
||||
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
for B in apidoc autogen build quickstart ; do
|
||||
ln -s %{_bindir}/sphinx-$B-%{py3_ver} %{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-%{py3_ver}.1 %{buildroot}%{_mandir}/man1/sphinx-$M-%{py3_ver}.1
|
||||
ln -s %{_mandir}/man1/sphinx-$M-%{py3_ver}.1 %{buildroot}%{_mandir}/man1/sphinx-$M.1
|
||||
done
|
||||
%find_lang sphinx
|
||||
|
||||
#TODO: Fix
|
||||
#%%check
|
||||
#nosetests-%%{py3_ver}
|
||||
|
||||
%pre
|
||||
# Since /usr/bin/sphinx-* became ghosted to be used with update-alternatives, we have
|
||||
# to get rid of the old binary resulting from the non-update-alternativies-ified package:
|
||||
[[ ! -L %{_bindir}/sphinx-apidoc ]] && rm -f %{_bindir}/sphinx-apidoc
|
||||
[[ ! -L %{_bindir}/sphinx-build ]] && rm -f %{_bindir}/sphinx-build
|
||||
[[ ! -L %{_bindir}/sphinx-autogen ]] && rm -f %{_bindir}/sphinx-autogen
|
||||
[[ ! -L %{_bindir}/sphinx-quickstart ]] && rm -f %{_bindir}/sphinx-quickstart
|
||||
[[ ! -L %{_mandir}/man1/sphinx-all.1.gz ]] && rm -f %{_mandir}/man1/sphinx-all.1.gz
|
||||
[[ ! -L %{_mandir}/man1/sphinx-apidoc.1.gz ]] && rm -f %{_mandir}/man1/sphinx-apidoc.1.gz
|
||||
[[ ! -L %{_mandir}/man1/sphinx-build.1.gz ]] && rm -f %{_mandir}/man1/sphinx-build.1.gz
|
||||
[[ ! -L %{_mandir}/man1/sphinx-quickstart.1.gz ]] && rm -f %{_mandir}/man1/sphinx-quickstart.1.gz
|
||||
exit 0
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
--install %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py3_ver} 30 \
|
||||
--slave %{_bindir}/sphinx-build sphinx-build %{_bindir}/sphinx-build-%{py3_ver} \
|
||||
--slave %{_bindir}/sphinx-autogen sphinx-autogen %{_bindir}/sphinx-autogen-%{py3_ver} \
|
||||
--slave %{_bindir}/sphinx-quickstart sphinx-quickstart %{_bindir}/sphinx-quickstart-%{py3_ver} \
|
||||
--slave %{_mandir}/man1/sphinx-all.1.gz sphinx-all.1 %{_mandir}/sphinx-all-%{py3_ver}.1.gz \
|
||||
--slave %{_mandir}/man1/sphinx-apidoc.1.gz sphinx-apidoc.1 %{_mandir}/sphinx-apidoc-%{py3_ver}.1.gz \
|
||||
--slave %{_mandir}/man1/sphinx-build.1.gz sphinx-build.1 %{_mandir}/sphinx-build-%{py3_ver}.1.gz \
|
||||
--slave %{_mandir}/man1/sphinx-quickstart.1.gz sphinx-quickstart.1 %{_mandir}/sphinx-quickstart-%{py3_ver}.1.gz \
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove sphinx-build %{_bindir}/sphinx-apidoc-%{py3_ver}
|
||||
fi
|
||||
|
||||
%files -f sphinx.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS CHANGES LICENSE README TODO
|
||||
%ghost %attr(0755,root,root) %{_bindir}/sphinx-apidoc
|
||||
%{_bindir}/sphinx-apidoc-%{py3_ver}
|
||||
%ghost %attr(0755,root,root) %{_bindir}/sphinx-autogen
|
||||
%{_bindir}/sphinx-autogen-%{py3_ver}
|
||||
%ghost %attr(0755,root,root) %{_bindir}/sphinx-build
|
||||
%{_bindir}/sphinx-build-%{py3_ver}
|
||||
%ghost %attr(0755,root,root) %{_bindir}/sphinx-quickstart
|
||||
%{_bindir}/sphinx-quickstart-%{py3_ver}
|
||||
%ghost %{_mandir}/man1/sphinx-all.1.gz
|
||||
%{_mandir}/man1/sphinx-all-%{py3_ver}.1.gz
|
||||
%ghost %{_mandir}/man1/sphinx-apidoc.1.gz
|
||||
%{_mandir}/man1/sphinx-apidoc-%{py3_ver}.1.gz
|
||||
%ghost %{_mandir}/man1/sphinx-build.1.gz
|
||||
%{_mandir}/man1/sphinx-build-%{py3_ver}.1.gz
|
||||
%ghost %{_mandir}/man1/sphinx-quickstart.1.gz
|
||||
%{_mandir}/man1/sphinx-quickstart-%{py3_ver}.1.gz
|
||||
%{python3_sitelib}/sphinx
|
||||
%{python3_sitelib}/Sphinx-%{version}-py%{py3_ver}.egg-info
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc EXAMPLES build/sphinx/html
|
||||
|
||||
%changelog
|
Loading…
x
Reference in New Issue
Block a user