diff --git a/python-2.7-texinfobuilder.patch b/python-2.7-texinfobuilder.patch new file mode 100644 index 0000000..13ed00f --- /dev/null +++ b/python-2.7-texinfobuilder.patch @@ -0,0 +1,21 @@ +--- Python-2.7.5/Doc/conf.py.orig 2013-09-28 16:22:35.624179804 +0200 ++++ Python-2.7.5/Doc/conf.py 2013-09-28 16:22:55.638045295 +0200 +@@ -154,6 +154,18 @@ + # Get LaTeX to handle Unicode correctly + latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''} + ++# Options for Texinfo output ++# -------------------------- ++ ++texinfo_documents = [ ++ ('contents', 'python', 'Python Documentation', _stdauthor, ++ 'Python', 'Python Documentation', 'Software Development'), ++] ++ ++texinfo_show_urls = [ ++ 'footnote', ++] ++ + # Options for the coverage checker + # -------------------------------- + diff --git a/python-2.7-texinfomakefile.patch b/python-2.7-texinfomakefile.patch new file mode 100644 index 0000000..8d4fdb4 --- /dev/null +++ b/python-2.7-texinfomakefile.patch @@ -0,0 +1,31 @@ +--- Python-2.7.5/Doc/Makefile.orig 2013-09-28 16:15:03.713207958 +0200 ++++ Python-2.7.5/Doc/Makefile 2013-09-28 16:18:04.634997824 +0200 +@@ -14,7 +14,7 @@ + ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \ + $(SPHINXOPTS) . build/$(BUILDER) $(SOURCES) + +-.PHONY: help checkout update build html htmlhelp latex text changes linkcheck \ ++.PHONY: help checkout update build html htmlhelp latex texinfo text changes linkcheck \ + suspicious coverage doctest pydoc-topics htmlview clean dist check serve \ + autobuild-dev autobuild-stable + +@@ -25,6 +25,7 @@ + @echo " html to make standalone HTML files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" ++ @echo " texinfo to make Texinfo (.texi) files" + @echo " text to make plain text files" + @echo " changes to make an overview over all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" +@@ -77,6 +59,11 @@ + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + ++texinfo: BUILDER = texinfo ++texinfo: build ++ @echo "Build finished; the TeXInfo files are in build/texinfo." ++ @echo "Run \`make info' in that directory to generate the info files." ++ + text: BUILDER = text + text: build + @echo "Build finished; the text files are in build/text." diff --git a/python-docs.spec b/python-docs.spec index 601063c..13ea29b 100644 --- a/python-docs.spec +++ b/python-docs.spec @@ -28,6 +28,11 @@ URL: http://www.python.org/ Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2 Patch4: python-2.6-nowhatsnew.patch Patch18: python-2.6-extdocmodules.patch +# this changes the makefile so that build requires are used instead of +# hard coded svn checkout to get sphinx +Patch19: python-2.7-texinfomakefile.patch +# this enables the texinfo builder +Patch20: python-2.7-texinfobuilder.patch BuildArch: noarch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -54,19 +59,59 @@ programming language and interpreter. Install the python-docs package if you'd like to use the documentation for the Python language. +%package -n python-docs-info +Summary: Documentation for the Python programming language as info pages +Group: Documentation +Requires(post): info +Requires(preun): info +BuildRequires: texinfo +%description -n python-docs-info +The python-docs-info package contains documentation on the Python +programming language and interpreter as info pages. + +Install the python-docs-info package if you'd like to read the +documentation for the Python language using the info command or Emacs. + %prep %setup -q -n Python-%{version} #patch4 -p1 -b .nowhatsnew %patch18 -p1 -b .extdocmodules +%patch19 -p1 -b .texinfomakefile +%patch20 -p1 -b .texinfobuilder %build make -C Doc html +# build info docs +make -C Doc texinfo +make -C Doc/build/texinfo info + # Work around rhbz#670493: cd Doc/build/html ln -s py-modindex.html modindex.html +%install +rm -fr $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT + +# install info files +mkdir -p %{buildroot}%{_infodir} +cp -v Doc/build/texinfo/python.info Doc/build/texinfo/logging_flow.png \ + %{buildroot}%{_infodir} + +%clean +rm -fr $RPM_BUILD_ROOT + +%post -n python-docs-info +/sbin/install-info %{_infodir}/python.info %{_infodir}/dir || : + +%preun -n python-docs-info +if [ $1 = 0 ]; then + /sbin/install-info --delete %{_infodir}/python.info.gz %{_infodir}/dir || : +fi + %check # Verify that all of the local links work (see rhbz#670493) # @@ -84,7 +129,15 @@ linkchecker \ %doc Misc/NEWS Misc/README Misc/cheatsheet %doc Misc/HISTORY Doc/build/html +%files -n python-docs-info +%defattr(-,root,root,-) +%{_infodir}/python.info.gz +%{_infodir}/logging_flow.png.gz + %changelog +* Sun Nov 24 2013 Suvayu Ali - 2.7.5-2 +- Enable Texinfo builder, add subpackage with python info pages + * Fri Nov 22 2013 Tomas Radej - 2.7.5-3 - Spec cleanup