Fix sphinx building to be Fedora only
This commit is contained in:
parent
a834d89727
commit
6dd9f544fa
@ -13,13 +13,13 @@ Source0: http://pypi.python.org/packages/source/v/virtualenv/virtualenv-%
|
|||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python-devel, python-sphinx
|
BuildRequires: python-devel
|
||||||
Requires: python-setuptools, python-devel
|
Requires: python-setuptools, python-devel
|
||||||
|
|
||||||
# Fedora requires python-setuptools-devel while EL5 fails on install
|
# Fedora requires python-setuptools-devel while EL5 fails on install
|
||||||
# See BZ#611536 (https://bugzilla.redhat.com/show_bug.cgi?id=611536)
|
# See BZ#611536 (https://bugzilla.redhat.com/show_bug.cgi?id=611536)
|
||||||
%if 0%{?fedora} > 0
|
%if 0%{?fedora} > 0
|
||||||
BuildRequires: python-setuptools-devel
|
BuildRequires: python-setuptools-devel, python-sphinx
|
||||||
Requires: python-setuptools-devel
|
Requires: python-setuptools-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -39,8 +39,12 @@ licensed under an MIT-style permissive license.
|
|||||||
%build
|
%build
|
||||||
# Build code
|
# Build code
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
# Build docs
|
|
||||||
|
# Build docs on Fedora
|
||||||
|
%if 0%{?fedora} > 0
|
||||||
%{__python} setup.py build_sphinx
|
%{__python} setup.py build_sphinx
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -54,7 +58,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%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
|
# For noarch packages: sitelib
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
%attr(755,root,root) %{_bindir}/virtualenv
|
%attr(755,root,root) %{_bindir}/virtualenv
|
||||||
|
Loading…
Reference in New Issue
Block a user