[graphite-web] %{__python} is deprecated so use %{__python2}

Jamie Nguyen jamielinux at fedoraproject.org
Fri Nov 14 18:27:09 UTC 2014


commit 5ca65beff1f03ad26ce32c02d317a4eacaa5a7a0
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Fri Nov 14 18:25:30 2014 +0000

    %{__python} is deprecated so use %{__python2}

 graphite-web.spec |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/graphite-web.spec b/graphite-web.spec
index b633792..f976ce8 100644
--- a/graphite-web.spec
+++ b/graphite-web.spec
@@ -1,4 +1,8 @@
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%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 commit 28cc7276784bcc4d8a1be6854a6add1145ec4109
 
@@ -123,12 +127,12 @@ install -m0644 %{SOURCE3} README.selinux
 
 
 %build
-%{__python} setup.py build
+%{__python2} setup.py build
 
 
 %install
 rm -rf %{buildroot}
-%{__python} setup.py install --optimize=1 --skip-build --root %{buildroot} \
+%{__python2} setup.py install --optimize=1 --skip-build --root %{buildroot} \
     --install-lib=%{python_sitelib} \
     --install-data=%{_datadir}/graphite \
     --install-scripts=%{_bindir}


More information about the scm-commits mailing list