From c204f154258b923ff7ff9c3c31b0889872072c0f Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Sep 13 2016 12:57:51 +0000 Subject: Use macro that are now ready --- diff --git a/awscli.spec b/awscli.spec index 68c2208..56d6efd 100644 --- a/awscli.spec +++ b/awscli.spec @@ -1,8 +1,5 @@ %if 0%{?rhel} %global with_python3 0 -%{!?__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))")} %else %global with_python3 1 %endif @@ -56,14 +53,14 @@ rm -rf %{name}.egg-info %if 0%{?with_python3} %py3_build %else -CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s" +%py2_build %endif # with_python3 %install %if 0%{?with_python3} %py3_install %else -CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot} +%py2_install %endif # with_python3 # Fix path and permissions for bash completition %global bash_completion_dir /etc/bash_completion.d