diff --git a/.gitignore b/.gitignore index e69de29..2a58d57 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Python-3.3.2.tar.xz diff --git a/python3-docs-use-local-python3-sphinx.patch b/python3-docs-use-local-python3-sphinx.patch new file mode 100644 index 0000000..957bbea --- /dev/null +++ b/python3-docs-use-local-python3-sphinx.patch @@ -0,0 +1,40 @@ +diff -r 042ff9325c5e Doc/Makefile +--- a/Doc/Makefile Mon Jul 22 22:08:09 2013 -0700 ++++ b/Doc/Makefile Mon Sep 16 14:43:50 2013 +0200 +@@ -4,7 +4,7 @@ + # + + # You can set these variables from the command line. +-PYTHON = python ++PYTHON = python3 + SVNROOT = http://svn.python.org/projects + SPHINXOPTS = + PAPER = +@@ -58,7 +58,7 @@ + + update: clean checkout + +-build: checkout ++build: + mkdir -p build/$(BUILDER) build/doctrees + $(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS) + @echo +diff -r 042ff9325c5e Doc/tools/sphinx-build.py +--- a/Doc/tools/sphinx-build.py Mon Jul 22 22:08:09 2013 -0700 ++++ b/Doc/tools/sphinx-build.py Mon Sep 16 14:43:50 2013 +0200 +@@ -14,15 +14,5 @@ + warnings.filterwarnings('ignore', category=UserWarning, module='jinja2') + + if __name__ == '__main__': +- +- if sys.version_info[:3] < (2, 4, 0): +- sys.stderr.write("""\ +-Error: Sphinx needs to be executed with Python 2.4 or newer (not 3.0 though). +-(If you run this from the Makefile, you can set the PYTHON variable +-to the path of an alternative interpreter executable, e.g., +-``make html PYTHON=python2.5``). +-""") +- sys.exit(1) +- + from sphinx import main + sys.exit(main(sys.argv)) diff --git a/python3-docs.spec b/python3-docs.spec new file mode 100644 index 0000000..e8e523b --- /dev/null +++ b/python3-docs.spec @@ -0,0 +1,85 @@ +%if 0%{?fedora} +%global check_links 1 +%else +%global check_links 0 +%endif + +%{!?__python_ver:%global __python_ver 3} + +%if "%{__python_ver}" != "EMPTY" +%global main_python 0 +%global python python%{__python_ver} +%else +%global main_python 1 +%global python python +%endif + +%define pybasever 3.3 + +Summary: Documentation for the Python 3 programming language +Name: %{python}-docs +# The Version needs to be in-sync with the "python" package: +Version: %{pybasever}.2 +Release: 2%{?dist} +License: Python +Group: Documentation +Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz +BuildArch: noarch + +Patch0: python3-docs-use-local-python3-sphinx.patch + +Requires: %{python} = %{version} + +BuildRequires: %{python} +BuildRequires: %{python}-sphinx +BuildRequires: %{python}-docutils +BuildRequires: %{python}-pygments + +%if %{check_links} +BuildRequires: linkchecker +%endif + +URL: http://www.python.org/ + +%description +The python3-docs package contains documentation on the Python 3 +programming language and interpreter. + +Install the python3-docs package if you'd like to use the documentation +for the Python 3 language. + +%prep +%setup -q -n Python-%{version} + +%patch0 -p1 + +%build +make -C Doc html +rm Doc/build/html/.buildinfo + +%install +mkdir -p $RPM_BUILD_ROOT + +%check +# Verify that all of the local links work (see rhbz#670493 - doesn't apply +# to python3-docs, but only to older python-docs) +# +# (we can't check network links, as we shouldn't be making network connections +# within a build. Also, don't bother checking the .txt source files; some +# contain example URLs, which don't work) +%if %{check_links} +linkchecker \ + --ignore-url=^mailto: --ignore-url=^http --ignore-url=^ftp \ + --ignore-url=.txt\$ \ + Doc/build/html/index.html +%endif + +%files +%doc Misc/NEWS Misc/HISTORY Misc/README Doc/build/html + +%changelog +* Mon Sep 16 2013 Bohuslav Kabrda - 3.3.2-2 +- Patch docs build to use locally installed python3-sphinx. + +* Wed Sep 04 2013 Bohuslav Kabrda - 3.3.2-1 +- Initial package, spec adapted from python-docs. diff --git a/sources b/sources index e69de29..acfd2af 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c94b78ea3b68a9bbc9906af4d5b4fdc7 Python-3.3.2.tar.xz