[python-httpretty] Add RHEL6 python2 macros
Jamie Lennox
jamielennox at fedoraproject.org
Mon Mar 2 00:50:25 UTC 2015
commit 9d75d78985b19510fcbab49f839a4c16bf4b5084
Author: Jamie Lennox <jamielennox at redhat.com>
Date: Mon Mar 2 11:48:37 2015 +1100
Add RHEL6 python2 macros
python-httpretty.spec | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/python-httpretty.spec b/python-httpretty.spec
index a37f9a1..f45705a 100644
--- a/python-httpretty.spec
+++ b/python-httpretty.spec
@@ -3,11 +3,17 @@
%global with_python3 1
%endif
+%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
+
%global run_tests 0
Name: python-httpretty
Version: 0.8.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: HTTP request mock tool for Python
License: MIT
@@ -112,6 +118,9 @@ popd
%changelog
+* Mon Mar 02 2015 Jamie Lennox <jamielennox at redhat.com> - 0.8.3-3
+- Added conditional __python2 macros for building on RHEL 6.
+
* Tue Feb 24 2015 Jamie Lennox <jamielennox at redhat.com> - 0.8.3-2
- Added with_python3 build flags to enable building on EPEL.
More information about the scm-commits
mailing list