From 9d75d78985b19510fcbab49f839a4c16bf4b5084 Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Mon, 2 Mar 2015 11:48:37 +1100 Subject: [PATCH] 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 - 0.8.3-3 +- Added conditional __python2 macros for building on RHEL 6. + * Tue Feb 24 2015 Jamie Lennox - 0.8.3-2 - Added with_python3 build flags to enable building on EPEL.