[python-fudge] Fix building on EL6

Orion Poplawski orion at fedoraproject.org
Thu Feb 26 20:06:37 UTC 2015


commit 97448b450abc4a9c97b83495ef95795943c9074e
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Thu Feb 26 13:06:36 2015 -0700

    Fix building on EL6

 python-fudge.spec | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/python-fudge.spec b/python-fudge.spec
index efa708c..1a0460a 100644
--- a/python-fudge.spec
+++ b/python-fudge.spec
@@ -1,4 +1,9 @@
-%if 0%{?fedora} > 15
+# Need for EL6
+%{!?__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))")}
+
+%if 0%{?fedora}
     %global with_python3 1
 %endif
 
@@ -16,7 +21,12 @@ Source1: tox.ini
 BuildArch: noarch
 BuildRequires: python2-devel python-setuptools
 # Build req. for the test suite
-BuildRequires: python-tox python-nose python-sphinx
+BuildRequires: python-tox python-sphinx
+%if 0%{?rhel} && 0%{?rhel} == 6
+BuildRequires: python-nose1.1
+%else
+BuildRequires: python-nose
+%endif
 
 %global fudge_desc \
 Fudge is a Python module for using fake objects (mocks and stubs) \
@@ -45,6 +55,12 @@ This is python3 build.
 # We'll use a custom config since we dont have access to the outside 
 # in fedora buildsys
 cp %{SOURCE1}  %{_builddir}/fudge-%{version}
+%if 0%{?rhel} && 0%{?rhel} == 6
+# Need newer nose
+sed -i -e s/nosetests/nosetests1.1/ tox.ini
+# Use different theme
+sed -i -e /html_theme/s/nature/default/ docs/conf.py
+%endif
 
 %if 0%{?with_python3}
     rm -rf %{py3dir}


More information about the scm-commits mailing list