Commit da3391a1 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé

rpm: use new python macros for build/install rules

The new %py{2,3}_{build,install} macros ensure that the right compiler
and linker flags are used when building python modules.
Reviewed-by: 's avatarAndrea Bolognani <abologna@redhat.com>
Signed-off-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
parent 67dcc189
......@@ -119,19 +119,35 @@ exit 1
%endif
%if %{with_python2}
%if 0%{?fedora} || 0%{?rhel} >= 8
%py2_build
%else
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
%endif
%endif
%if %{with_python3}
%if 0%{?fedora} || 0%{?rhel} >= 8
%py3_build
%else
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%endif
%endif
%install
%if %{with_python2}
%if 0%{?fedora} || 0%{?rhel} >= 8
%py2_install
%else
%{__python2} setup.py install --skip-build --root=%{buildroot}
%endif
%endif
%if %{with_python3}
%if 0%{?fedora} || 0%{?rhel} >= 8
%py3_install
%else
%{__python3} setup.py install --skip-build --root=%{buildroot}
%endif
%endif
%check
%if %{with_python2}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment