[python-eventlet/el5/master] Fixed documentation build (almost as in bz#606893).

Lev Shamardin abbot at fedoraproject.org
Wed Sep 8 14:06:38 UTC 2010


commit 78659b04bc32606c4a2f4159f60f25dfaad08119
Author: Lev Shamardin <shamardin at gmail.com>
Date:   Wed Sep 8 18:05:41 2010 +0400

    Fixed documentation build (almost as in bz#606893).

 docs-epel5.patch     |   40 ++++++++++++++++++++++++++++++++++++++++
 python-eventlet.spec |   20 ++++++++++----------
 2 files changed, 50 insertions(+), 10 deletions(-)
---
diff --git a/docs-epel5.patch b/docs-epel5.patch
new file mode 100644
index 0000000..4f4d6d9
--- /dev/null
+++ b/docs-epel5.patch
@@ -0,0 +1,40 @@
+From ad5d40eb5b2388f0e67b0119858ef30f195c6f88 Mon Sep 17 00:00:00 2001
+From: Lev Shamardin <shamardin at gmail.com>
+Date: Wed, 8 Sep 2010 17:38:34 +0400
+Subject: [PATCH] Build docs under EPEL5
+
+---
+ eventlet-0.9.12/doc/conf.py       |    3 +--
+ eventlet-0.9.12/doc/threading.rst |    2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/eventlet-0.9.12/doc/conf.py b/eventlet-0.9.12/doc/conf.py
+index cda080f..41c0a21 100644
+--- a/eventlet-0.9.12/doc/conf.py
++++ b/eventlet-0.9.12/doc/conf.py
+@@ -22,8 +22,7 @@ import sys, os
+ 
+ # Add any Sphinx extension module names here, as strings. They can be extensions
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 
+-              'sphinx.ext.intersphinx']
++extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage']
+ 
+ # If this is True, '.. todo::' and '.. todolist::' produce output, else they produce
+ # nothing. The default is False.
+diff --git a/eventlet-0.9.12/doc/threading.rst b/eventlet-0.9.12/doc/threading.rst
+index ed24b72..b6ed544 100644
+--- a/eventlet-0.9.12/doc/threading.rst
++++ b/eventlet-0.9.12/doc/threading.rst
+@@ -3,7 +3,7 @@ Threads
+ 
+ Eventlet is thread-safe and can be used in conjunction with normal Python threads.  The way this works is that coroutines are confined to their 'parent' Python thread.  It's like each thread contains its own little world of coroutines that can switch between themselves but not between coroutines in other threads.  
+ 
+-.. image:: /images/threading_illustration.png
++.. image:: images/threading_illustration.png
+ 
+ You can only communicate cross-thread using the "real" thread primitives and pipes.  Fortunately, there's little reason to use threads for concurrency when you're already using coroutines.
+ 
+-- 
+1.5.5.6
+
diff --git a/python-eventlet.spec b/python-eventlet.spec
index a1017bd..e778f28 100644
--- a/python-eventlet.spec
+++ b/python-eventlet.spec
@@ -4,20 +4,19 @@
 
 Name:           python-eventlet
 Version:        0.9.12
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Highly concurrent networking library
 Group:          Development/Libraries
 License:        MIT
 URL:            http://eventlet.net
 Source0:        http://pypi.python.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
+Patch0:         docs-epel5.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  python2-devel
 BuildRequires:  python-setuptools
-%if 0%{?fedora} > 8
 BuildRequires:  python-sphinx
 BuildRequires:  python-greenlet
-%endif
 Requires:       python-greenlet
 
 %description
@@ -26,7 +25,6 @@ scalability by using non-blocking io while at the same time retaining
 high programmer usability by using coroutines to make the non-blocking
 io operations appear blocking at the source code level.
 
-%if 0%{?fedora} > 8
 %package doc
 Summary:        Documentation for %{name}
 Group:          Documentation
@@ -34,7 +32,6 @@ Requires:       %{name} = %{version}-%{release}
 
 %description doc
 Documentation for the python-eventlet package.
-%endif
 
 
 %prep
@@ -42,16 +39,18 @@ Documentation for the python-eventlet package.
 find -name '.*' -type f -exec rm {} \;
 sed -i -e 's/
//g' tests/mock.py
 sed -i -e '1d' eventlet/support/greendns.py
+%if 0%{?fedora} < 9
+%patch0 -p2
+mkdir -p doc/_static
+%endif
 
 %build
 %{__python} setup.py build
-%if 0%{?fedora} > 8
 pushd doc
 make html
-rm _build/html/.buildinfo
+rm -f _build/html/.buildinfo
 popd
 chmod a-x tests/mock.py
-%endif
 
 %install
 rm -rf %{buildroot}
@@ -67,13 +66,14 @@ rm -rf %{buildroot}
 %{python_sitelib}/eventlet
 %{python_sitelib}/eventlet*.egg-info
 
-%if 0%{?fedora} > 8
 %files doc
 %defattr(-,root,root,-)
 %doc doc/_build/html examples tests
-%endif
 
 %changelog
+* Wed Sep 08 2010 Lev Shamardin <shamardin at gmail.com> - 0.9.12-2
+- Fixed documentation build under EPEL5.
+
 * Wed Sep 08 2010 Lev Shamardin <shamardin at gmail.com> - 0.9.12-1
 - Updated to version 0.9.12.
 


More information about the scm-commits mailing list