From 6dd9f544fad1e824897860661aa96a62a48f0551 Mon Sep 17 00:00:00 2001 From: Steve 'Ashcrow' Milner Date: Tue, 20 Dec 2011 11:06:33 -0500 Subject: [PATCH] Fix sphinx building to be Fedora only --- python-virtualenv.spec | 16 ++++++++++++---- 1 file 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