Use macro that are now ready

This commit is contained in:
Fabio Alessandro Locati 2016-09-13 13:57:51 +01:00
parent ea453a5d2b
commit c204f15425

View File

@ -1,8 +1,5 @@
%if 0%{?rhel} %if 0%{?rhel}
%global with_python3 0 %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 %else
%global with_python3 1 %global with_python3 1
%endif %endif
@ -56,14 +53,14 @@ rm -rf %{name}.egg-info
%if 0%{?with_python3} %if 0%{?with_python3}
%py3_build %py3_build
%else %else
CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s" %py2_build
%endif # with_python3 %endif # with_python3
%install %install
%if 0%{?with_python3} %if 0%{?with_python3}
%py3_install %py3_install
%else %else
CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %py2_install
%endif # with_python3 %endif # with_python3
# Fix path and permissions for bash completition # Fix path and permissions for bash completition
%global bash_completion_dir /etc/bash_completion.d %global bash_completion_dir /etc/bash_completion.d