%{!?py3_install:%global py3_install %{__python3} setup.py install -O1 --skip-build --root %{buildroot}}
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python_provide: %global python_provide Provides: python-%{srcname} = %{version}-%{release}}
%{!?python2_version: %global python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")}
%{!?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
+# no python 3 in EL <= 7
%if 0%{?rhel}
%global with_python3 0
%else
%global with_python3 1
%endif
+# incompatible unittest module in EL <= 6
%if 0%{?rhel} && 0%{?rhel} <= 6
%global with_tests 0
%else