From 12afa7dd63f71a9dff11eb724781a7bd83a76ab8 Mon Sep 17 00:00:00 2001 From: Tomas Radej Date: Nov 27 2013 08:45:33 +0000 Subject: Merge branch 'master' into f19 --- 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 d83948a..6530b22 100644 --- a/python-docs.spec +++ b/python-docs.spec @@ -16,36 +16,42 @@ %define pybasever 2.7 -Summary: Documentation for the Python programming language -Name: %{python}-docs +Name: %{python}-docs # The Version needs to be in-sync with the "python" package: -Version: 2.7.5 -Release: 1%{?dist} -License: Python -Group: Documentation -Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2 -BuildArch: noarch - -Patch4: python-2.6-nowhatsnew.patch -Patch18: python-2.6-extdocmodules.patch - -Requires: %{python} = %{version} -%if %{main_python} -Obsoletes: python2-docs -Provides: python2-docs = %{version} +Version: 2.7.5 +Release: 5%{?dist} +Summary: Documentation for the Python programming language +Group: Documentation +License: Python +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) + +BuildRequires: %{python} +BuildRequires: python-docutils +BuildRequires: python-pygments +BuildRequires: python-sphinx +%if %{check_links} +BuildRequires: linkchecker %endif -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) - -BuildRequires: %{python} python-sphinx python-docutils -BuildRequires: python-pygments +Requires: %{python} = %{version} -%if %{check_links} -BuildRequires: linkchecker +%if %{main_python} +Obsoletes: python2-docs +Provides: python2-docs = %{version} %endif -URL: http://www.python.org/ - %description The python-docs package contains documentation on the Python programming language and interpreter. @@ -53,26 +59,55 @@ programming language and interpreter. Install the python-docs package if you'd like to use the documentation for the Python language. +%package info +Summary: Documentation for the Python programming language as info pages +Group: Documentation +Requires(post): info +Requires(preun):info +BuildRequires: texinfo + +%description 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 +# install info files +mkdir -p %{buildroot}%{_infodir} +cp -v Doc/build/texinfo/python.info %{buildroot}%{_infodir} -mkdir -p $RPM_BUILD_ROOT +# edit path to image file in info page +sed -i -e 's,logging_flow\.png,%{_docdir}/%{name}/html/_images/&,' \ + %{buildroot}%{_infodir}/python.info -%clean -rm -fr $RPM_BUILD_ROOT +%post info +/sbin/install-info %{_infodir}/python.info %{_infodir}/dir || : + +%preun 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) @@ -88,11 +123,25 @@ linkchecker \ %endif %files -%defattr(-,root,root,-) -%doc Misc/NEWS Misc/README Misc/cheatsheet +%doc Misc/NEWS Misc/README Misc/cheatsheet %doc Misc/HISTORY Doc/build/html +%files info +%{_infodir}/python.info.gz + %changelog +* Tue Nov 26 2013 Tomas Radej - 2.7.5-5 +- Small tweaks of Suvayu's patch + +* Sun Nov 24 2013 Suvayu Ali - 2.7.5-4 +- Enable Texinfo builder, add subpackage with python info pages + +* Fri Nov 22 2013 Tomas Radej - 2.7.5-3 +- Spec cleanup + +* Sun Aug 04 2013 Fedora Release Engineering - 2.7.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Fri May 24 2013 Bohuslav Kabrda - 2.7.5-1 - Version 2.7.5.