[python-virtualenv] Fix sphinx building to be Fedora only

smilner smilner at fedoraproject.org
Tue Dec 20 16:07:06 UTC 2011


commit 6dd9f544fad1e824897860661aa96a62a48f0551
Author: Steve 'Ashcrow' Milner <stevem at gnulinux.net>
Date:   Tue Dec 20 11:06:33 2011 -0500

    Fix sphinx building to be Fedora only

 python-virtualenv.spec |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/python-virtualenv.spec b/python-virtualenv.spec
index 1747853..7f9d027 100644
--- a/python-virtualenv.spec
+++ b/python-virtualenv.spec
@@ -13,13 +13,13 @@ Source0:        http://pypi.python.org/packages/source/v/virtualenv/virtualenv-%
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
-BuildRequires:  python-devel, python-sphinx
+BuildRequires:  python-devel
 Requires:       python-setuptools, python-devel
 
 # Fedora requires python-setuptools-devel while EL5 fails on install
 # See BZ#611536 (https://bugzilla.redhat.com/show_bug.cgi?id=611536)
 %if 0%{?fedora} > 0
-BuildRequires:  python-setuptools-devel
+BuildRequires:  python-setuptools-devel, python-sphinx
 Requires:       python-setuptools-devel
 %endif
 
@@ -39,8 +39,12 @@ licensed under an MIT-style permissive license.
 %build
 # Build code
 %{__python} setup.py build
-# Build docs
+
+# Build docs on Fedora
+%if 0%{?fedora} > 0
 %{__python} setup.py build_sphinx
+%endif
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -54,7 +58,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc docs/*txt build/sphinx/* PKG-INFO AUTHORS.txt LICENSE.txt HACKING
+%doc docs/*txt PKG-INFO AUTHORS.txt LICENSE.txt HACKING
+# Include sphinx docs on Fedora
+%if 0%{?fedora} > 0
+%doc build/sphinx/*
+%endif
 # For noarch packages: sitelib
 %{python_sitelib}/*
 %attr(755,root,root) %{_bindir}/virtualenv


More information about the scm-commits mailing list