[python-manilaclient/f22] Fix EL6 build

Haïkel Guémar hguemar at fedoraproject.org
Fri Mar 6 13:43:51 UTC 2015


commit c7ea620ea4fc71ff603cfeda273559b9984370e2
Author: Haikel Guemar <hguemar at fedoraproject.org>
Date:   Fri Mar 6 14:43:44 2015 +0100

    Fix EL6 build

 python-manilaclient.spec | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/python-manilaclient.spec b/python-manilaclient.spec
index f8a5ff6..bd4c9d5 100644
--- a/python-manilaclient.spec
+++ b/python-manilaclient.spec
@@ -1,3 +1,9 @@
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2:        %global __python2 /usr/bin/python2}
+%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
+
 Name:       python-manilaclient
 Version:    1.0.1
 Release:    3%{?dist}
@@ -29,7 +35,11 @@ Share API.
 %package doc
 Summary:    Documentation for OpenStack Share API Client
 
+%if 0%{?rhel} && 0%{?rhel} <= 6
+BuildRequires: python-sphinx10
+%else
 BuildRequires: python-sphinx
+%endif
 
 %description doc
 Documentation for the client library for interacting with Openstack
@@ -41,6 +51,10 @@ Share API.
 # Remove bundled egg-info
 rm -rf python_manilaclient.egg-info
 
+%if 0%{?rhel} && %{?rhel} <= 6
+sed -i 's/sphinx-build/sphinx-1.0-build/g' doc/Makefile
+%endif
+
 # make doc build compatible with python-oslo-sphinx RPM
 sed -i 's/oslosphinx/oslo.sphinx/;s/^html_theme_options/#&/' doc/source/conf.py
 


More information about the scm-commits mailing list