CFLAGS="%{rpmcflags}" \
%{?with_system_libev:LIBEV_EMBED=false} \
%{?with_system_c_ares:CARES_EMBED=false} \
-%{__python} setup.py build --build-base build-2
+%py_build
%if %{with tests}
cd greentest
CFLAGS="%{rpmcflags}" \
%{?with_system_libev:LIBEV_EMBED=false} \
%{?with_system_c_ares:CARES_EMBED=false} \
-%{__python3} setup.py build --build-base build-3
+%py3_build
%if %{with tests}
cd greentest
%if %{with python2}
%{?with_system_libev:LIBEV_EMBED=false} \
%{?with_system_c_ares:CARES_EMBED=false} \
-%{__python} setup.py \
- build --build-base build-2 \
- install --skip-build \
- --optimize=2 \
- --root=$RPM_BUILD_ROOT
+%py_install
%py_postclean
%endif
%if %{with python3}
%{?with_system_libev:LIBEV_EMBED=false} \
%{?with_system_c_ares:CARES_EMBED=false} \
-%{__python3} setup.py \
- build --build-base build-3 \
- install --skip-build \
- --optimize=2 \
- --root=$RPM_BUILD_ROOT
+%py3_install
%endif
%clean