mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2024-10-26 07:55:06 +03:00
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: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
67dcc18908
commit
da3391a135
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user