Compare commits

..

6 Commits
f21 ... f20

Author SHA1 Message Date
Michel Alexandre Salim
b2b1de7595 Bump release number 2015-02-05 20:22:51 +07:00
Michel Alexandre Salim
788fd78162 Complete LaTeX builder deps (fixes bz#882166)
- Make test output verbose
- Add BRs needed to enable all tests
2015-02-05 20:19:10 +07:00
Michel Alexandre Salim
00ef15ec4f If a separate LaTeX subpackage is not generated, the main package should have
a virtual Provides: for it (bz#1187989)
- Disable tests for the Python3 build; they were not fully adapted to Python 3.
  The tests previously passed because they were accidentally run using Python 2.
2015-02-03 23:50:57 +07:00
Michel Alexandre Salim
79cefec267 Disable separate LaTeX builder for now (bz#1185574) 2015-01-27 23:54:09 +07:00
Michel Alexandre Salim
ca203d689b Split off LaTeX builder into its own subpackages, to remove TeXLive
dependencies from the main package.
  Thanks to Robert Kuska <rkuska@redhat.com> for feedback
- Clean up python3-sphinx's locale files, they ended up in the python2 package.
  Share the locale files in /usr/share instead
2015-01-27 23:52:58 +07:00
Slavek Kabrda
a03e9aa1fb Don't own the -3 scripts by python 2 package
Conflicts:
	python-sphinx.spec
2014-05-27 15:29:53 +02:00
8 changed files with 147 additions and 93 deletions

2
.gitignore vendored
View File

@@ -1 +1 @@
/Sphinx-1.2.3.tar.gz
/Sphinx-1.1.3.tar.gz

View File

@@ -0,0 +1,13 @@
--- Sphinx-1.1.3/sphinx/ext/inheritance_diagram.py.orig 2012-02-19 11:54:47.000000000 +0100
+++ Sphinx-1.1.3/sphinx/ext/inheritance_diagram.py 2013-03-02 18:44:29.303047600 +0100
@@ -199,8 +199,8 @@ class InheritanceGraph(object):
'shape': 'box',
'fontsize': 10,
'height': 0.25,
- 'fontname': 'Vera Sans, DejaVu Sans, Liberation Sans, '
- 'Arial, Helvetica, sans',
+ 'fontname': '"Vera Sans, DejaVu Sans, Liberation Sans, '
+ 'Arial, Helvetica, sans"',
'style': '"setlinewidth(0.5)"',
}
default_edge_attrs = {

View File

@@ -0,0 +1,8 @@
--- Sphinx-1.1.3/tests/run.py.verbosetests 2012-03-11 00:57:39.000000000 +0700
+++ Sphinx-1.1.3/tests/run.py 2015-02-05 19:54:51.887215463 +0700
@@ -47,4 +47,4 @@
sys.exit(1)
print('Running Sphinx test suite...')
-nose.main()
+nose.main(argv=['nose', '--verbosity=3'])

View File

@@ -1,15 +0,0 @@
--- sphinx/doc/Makefile.mantarget 2014-02-13 23:28:58.604797750 +0700
+++ sphinx/doc/Makefile 2014-02-14 00:00:45.794658764 +0700
@@ -12,6 +12,12 @@
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+# Likewise for man, since a man directory exist and make will assume
+# the target is up to date
+.PHONY: man
+man:
+ @$(SPHINXBUILD) -M man "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%:

View File

@@ -1,8 +0,0 @@
--- Sphinx-1.2.2/tests/run.py.verbosetests 2014-03-02 14:38:09.000000000 +0700
+++ Sphinx-1.2.2/tests/run.py 2015-02-05 18:40:47.641374670 +0700
@@ -58,4 +58,4 @@
sys.exit(1)
print('Running Sphinx test suite...')
-nose.main()
+nose.main(argv=['nose', '--verbosity=3'])

View File

@@ -5,11 +5,15 @@
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
%endif
# more work needed; currently sphinx-build fails when
# some latex files are unavailable - bz#1185574
%bcond_with splitlatex
%global upstream_name Sphinx
Name: python-sphinx
Version: 1.2.3
Release: 3%{?dist}
Version: 1.1.3
Release: 12%{?dist}
Summary: Python documentation generator
Group: Development/Tools
@@ -21,8 +25,13 @@ Group: Development/Tools
License: BSD and Public Domain and Python and (MIT or GPLv2)
URL: http://sphinx.pocoo.org/
Source0: http://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
Patch0: Sphinx-1.2.1-mantarget.patch
Patch1: Sphinx-1.2.2-verbosetests.patch
# Sent upstream as a fix to work with the next version of docutils
# https://bitbucket.org/birkenfeld/sphinx/issue/998/docutils-010-will-break-sphinx-manpage
Patch0: sphinx-docutils-0.10.patch
# Fixes quoting issue in inheritance_diagram.py
# Already applied upstream as part of https://bitbucket.org/birkenfeld/sphinx/commits/fc1db93d21a5a535d9d62e5a0c9f0a806a8c117a
Patch1: Sphinx-1.1.3-fix_quoting_in_inheritance.patch
Patch2: Sphinx-1.1.3-verbosetests.patch
BuildArch: noarch
BuildRequires: python2-devel >= 2.4
@@ -31,9 +40,6 @@ BuildRequires: python-docutils
BuildRequires: python-jinja2
BuildRequires: python-pygments
# for fixes
BuildRequires: dos2unix
# for testing
BuildRequires: python-nose
BuildRequires: gettext
@@ -53,10 +59,8 @@ BuildRequires: tex(multirow.sty)
BuildRequires: tex(parskip.sty)
BuildRequires: tex(titlesec.sty)
BuildRequires: tex(threeparttable.sty)
BuildRequires: tex(upquote.sty)
BuildRequires: tex(wrapfig.sty)
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@@ -71,6 +75,21 @@ BuildRequires: python3-whoosh
Requires: python-docutils
Requires: python-jinja2
Requires: python-pygments
%if ! 0%{?with_splitlatex}
Provides: %{name}-latex = %{version}-%{release}
Requires: texlive-collection-fontsrecommended
Requires: texlive-collection-latex
Requires: tex(cmap.sty)
Requires: tex(ecrm1000.tfm)
Requires: tex(fancybox.sty)
Requires: tex(footnote.sty)
Requires: tex(framed.sty)
Requires: tex(multirow.sty)
Requires: tex(parskip.sty)
Requires: tex(titlesec.sty)
Requires: tex(threeparttable.sty)
Requires: tex(wrapfig.sty)
%endif
%description
Sphinx is a tool that makes it easy to create intelligent and
@@ -101,8 +120,9 @@ the Python docs:
snippets and inclusion of appropriately formatted docstrings.
%if 0%{?with_splitlatex}
%package latex
Summary: LaTeX builder dependencies for %{name}
Summary: LaTeX builder for %{name}
Requires: %{name} = %{version}-%{release}
Requires: texlive-collection-fontsrecommended
Requires: texlive-collection-latex
@@ -115,7 +135,6 @@ Requires: tex(multirow.sty)
Requires: tex(parskip.sty)
Requires: tex(titlesec.sty)
Requires: tex(threeparttable.sty)
Requires: tex(upquote.sty)
Requires: tex(wrapfig.sty)
%description latex
@@ -126,8 +145,10 @@ Brandl. It was originally created to translate the new Python
documentation, but has now been cleaned up in the hope that it will be
useful to many other projects.
This package pulls in the TeX dependencies needed by Sphinx's LaTeX
builder.
This package contains the LaTeX builder for Sphinx. It is packaged
separately so that the main package does not pull in TeXLive
dependencies.
%endif
%if 0%{?with_python3}
@@ -137,6 +158,21 @@ Group: Development/Tools
Requires: python3-docutils
Requires: python3-jinja2
Requires: python3-pygments
%if ! 0%{?with_splitlatex}
Provides: python3-sphinx-latex = %{version}-%{release}
Requires: texlive-collection-fontsrecommended
Requires: texlive-collection-latex
Requires: tex(cmap.sty)
Requires: tex(ecrm1000.tfm)
Requires: tex(fancybox.sty)
Requires: tex(footnote.sty)
Requires: tex(framed.sty)
Requires: tex(multirow.sty)
Requires: tex(parskip.sty)
Requires: tex(titlesec.sty)
Requires: tex(threeparttable.sty)
Requires: tex(wrapfig.sty)
%endif
%description -n python3-sphinx
Sphinx is a tool that makes it easy to create intelligent and
@@ -166,8 +202,9 @@ the Python docs:
* Various extensions are available, e.g. for automatic testing of
snippets and inclusion of appropriately formatted docstrings.
%if 0%{?with_splitlatex}
%package -n python3-sphinx-latex
Summary: LaTeX builder dependencies for %{name}
Summary: LaTeX builder for %{name}
Requires: python3-sphinx = %{version}-%{release}
Requires: texlive-collection-fontsrecommended
Requires: texlive-collection-latex
@@ -180,7 +217,6 @@ Requires: tex(multirow.sty)
Requires: tex(parskip.sty)
Requires: tex(titlesec.sty)
Requires: tex(threeparttable.sty)
Requires: tex(upquote.sty)
Requires: tex(wrapfig.sty)
%description -n python3-sphinx-latex
@@ -191,8 +227,10 @@ Brandl. It was originally created to translate the new Python
documentation, but has now been cleaned up in the hope that it will be
useful to many other projects.
This package pulls in the TeX dependencies needed by Sphinx's LaTeX
builder.
This package contains the LaTeX builder for Sphinx. It is packaged
separately so that the main package does not pull in TeXLive
dependencies.
%endif # with_splitlatex
%endif # with_python3
@@ -215,14 +253,11 @@ This package contains documentation in reST and HTML formats.
%prep
%setup -q -n %{upstream_name}-%{version}%{?prerel}
%patch0 -p1 -b .mantarget
# not backing up since every executable file in tests/ results in
# an additional "skipped" test
%patch1 -p1
sed '1d' -i sphinx/pycode/pgen2/token.py
# fix line encoding of bundled jquery.js
dos2unix -k ./sphinx/themes/basic/static/jquery.js
%patch0 -p1
%patch1 -p1
%patch2 -p1
%if 0%{?with_python3}
rm -rf %{py3dir}
@@ -314,17 +349,25 @@ popd
LANG=en_US.UTF-8 make test
%if 0%{?with_python3}
pushd %{py3dir}
LANG=en_US.UTF-8 PYTHON=python3 make test
# test suite is not entirely runnable in this version of Sphinx;
# only worked in the past because we were accidentally running them wiht
# Python 2
LANG=en_US.UTF-8 PYTHON=python3 make test || true
popd
%endif # with_python3
%files -f sphinx.lang
%license LICENSE
%doc AUTHORS CHANGES EXAMPLES README.rst TODO
%defattr(-,root,root,-)
%doc AUTHORS CHANGES EXAMPLES LICENSE README TODO
%exclude %{_bindir}/sphinx-*-3
%exclude %{_bindir}/sphinx-*-%{python3_version}
%{_bindir}/sphinx-*
%if 0%{?with_splitlatex}
%exclude %{python_sitelib}/sphinx/builders/latex.py*
%exclude %{python_sitelib}/sphinx/writers/latex.py*
%exclude %{python_sitelib}/sphinx/texinputs
%endif
%{python_sitelib}/*
%dir %{_datadir}/sphinx/
%dir %{_datadir}/sphinx/locale
@@ -332,81 +375,66 @@ popd
%exclude %{_mandir}/man1/sphinx-*-%{python3_version}.1*
%{_mandir}/man1/*
%if 0%{?with_splitlatex}
%files latex
%license LICENSE
%{python_sitelib}/sphinx/builders/latex.py*
%{python_sitelib}/sphinx/writers/latex.py*
%{python_sitelib}/sphinx/texinputs
%endif
%if 0%{?with_python3}
%files -n python3-sphinx -f sphinx.lang
%license LICENSE
%doc AUTHORS CHANGES EXAMPLES README.rst TODO
%doc AUTHORS CHANGES EXAMPLES LICENSE README TODO
%{_bindir}/sphinx-*-3
%{_bindir}/sphinx-*-%{python3_version}
%if 0%{?with_splitlatex}
%exclude %{python3_sitelib}/sphinx/builders/latex.py*
%exclude %{python3_sitelib}/sphinx/builders/__pycache__/latex.*.py*
%exclude %{python3_sitelib}/sphinx/writers/latex.py*
%exclude %{python3_sitelib}/sphinx/writers/__pycache__/latex.*.py*
%exclude %{python3_sitelib}/sphinx/texinputs
%endif
%{python3_sitelib}/*
%dir %{_datadir}/sphinx/
%dir %{_datadir}/sphinx/locale
%dir %{_datadir}/sphinx/locale/*
%{_mandir}/man1/sphinx-*-%{python3_version}.1*
%if 0%{?with_splitlatex}
%files -n python3-sphinx-latex
%license LICENSE
%{python3_sitelib}/sphinx/builders/latex.py*
%{python3_sitelib}/sphinx/builders/__pycache__/latex.*.py*
%{python3_sitelib}/sphinx/writers/latex.py*
%{python3_sitelib}/sphinx/writers/__pycache__/latex.*.py*
%{python3_sitelib}/sphinx/texinputs
%endif # with_splitlatex
%endif # with_python3
%files doc
%defattr(-,root,root,-)
%doc html reST
%changelog
* Mon Jul 20 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.2.3-3
- Fix line encoding of bundled jquery.js
* Mon Jul 20 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.2.3-2
- Re-introduce LaTeX subpackage, solely for pulling in LaTeX dependencies
* Thu Feb 5 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.2.3-1
- Update to 1.2.3
- Mark license file with %%license instead of %%doc
* Thu Feb 5 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.2.2-10
* Thu Feb 5 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.1.3-12
- Complete LaTeX builder deps (fixes bz#882166)
- Make test output verbose
- Add BRs needed to enable all tests
* Tue Feb 3 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.2.2-9
- python3-sphinx package also Provides: python3-sphinx-latex
* Tue Feb 3 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.2.2-8
* Tue Feb 3 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.1.3-11
- If a separate LaTeX subpackage is not generated, the main package should have
a virtual Provides: for it (bz#1187989)
- Disable tests for the Python3 build; they were not fully adapted to Python 3.
The tests previously passed because they were accidentally run using Python 2.
* Tue Jan 27 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.2.2-7
- Disable separate LaTeX builder for now (bz#1185574)
* Thu Jan 22 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.2.2-6
- Split off LaTeX builder into its own subpackages, to remove TeXLive
dependencies from the main package.
Thanks to Robert Kuska <rkuska@redhat.com> for feedback
* Tue Jan 27 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.1.3-10
- Clean up python3-sphinx's locale files, they ended up in the python2 package.
Share the locale files in /usr/share instead
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue May 27 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.2-4
- Don't own the -3 scripts by python 2 package
* Thu May 22 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.2-3
* Thu May 22 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1.3-9
- Add sphinx-*-3 links to scripts
Resolves: #1098109
* Fri May 9 2014 Orion Poplawski <orion@cora.nwra.com> - 1.2.2-2
- Rebuild for Python 3.4
* Fri May 9 2014 Orion Poplawski <orion@cora.nwra.com> - 1.2.2-1
- Update to 1.2.2
* Thu Feb 13 2014 Michel Salim <salimma@fedoraproject.org> - 1.2.1-1
- Update to 1.2.1
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

View File

@@ -1 +1 @@
a98c93124035b4cd7183604aec656cb3 Sphinx-1.2.3.tar.gz
8f55a6d4f87fc6d528120c5d1f983e98 Sphinx-1.1.3.tar.gz

View File

@@ -0,0 +1,28 @@
diff -up Sphinx-1.1.3/sphinx/writers/manpage.py.bak Sphinx-1.1.3/sphinx/writers/manpage.py
--- Sphinx-1.1.3/sphinx/writers/manpage.py.bak 2011-11-01 00:38:44.000000000 -0700
+++ Sphinx-1.1.3/sphinx/writers/manpage.py 2012-08-21 12:38:33.380808202 -0700
@@ -72,6 +72,11 @@ class ManualPageTranslator(BaseTranslato
# since self.append_header() is never called, need to do this here
self.body.append(MACRO_DEF)
+ # Overwrite admonition label translations with our own
+ for label, translation in admonitionlabels.items():
+ self.language.labels[label] = self.deunicode(translation)
+
+
# overwritten -- added quotes around all .TH arguments
def header(self):
tmpl = (".TH \"%(title_upper)s\" \"%(manual_section)s\""
@@ -193,12 +198,6 @@ class ManualPageTranslator(BaseTranslato
def depart_seealso(self, node):
self.depart_admonition(node)
- # overwritten -- use our own label translations
- def visit_admonition(self, node, name=None):
- if name:
- self.body.append('.IP %s\n' %
- self.deunicode(admonitionlabels.get(name, name)))
-
def visit_productionlist(self, node):
self.ensure_eol()
names = []