1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2024-10-26 07:55:06 +03:00

rpm: use the versioned python2 macro names

The use of non-versioned python2 macro names is deprecated in Fedora

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2018-07-23 12:11:44 +01:00
parent f2b3e946e2
commit 5ca2cb0018

View File

@ -58,7 +58,7 @@ BuildRequires: python3-lxml
# Don't want provides for python shared objects
%if %{with_python2}
%{?filter_provides_in: %filter_provides_in %{python_sitearch}/.*\.so}
%{?filter_provides_in: %filter_provides_in %{python2_sitearch}/.*\.so}
%endif
%if %{with_python3}
%{?filter_provides_in: %filter_provides_in %{python3_sitearch}/.*\.so}
@ -118,7 +118,7 @@ exit 1
%endif
%if %{with_python2}
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
%endif
%if %{with_python3}
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
@ -126,7 +126,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%install
%if %{with_python2}
%{__python} setup.py install --skip-build --root=%{buildroot}
%{__python2} setup.py install --skip-build --root=%{buildroot}
%endif
%if %{with_python3}
%{__python3} setup.py install --skip-build --root=%{buildroot}
@ -134,7 +134,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%check
%if %{with_python2}
%{__python} setup.py test
%{__python2} setup.py test
%endif
%if %{with_python3}
%{__python3} setup.py test
@ -143,11 +143,11 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%if %{with_python2}
%files -n python2-libvirt
%doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/
%{python_sitearch}/libvirt.py*
%{python_sitearch}/libvirt_qemu.py*
%{python_sitearch}/libvirt_lxc.py*
%{python_sitearch}/libvirtmod*
%{python_sitearch}/*egg-info
%{python2_sitearch}/libvirt.py*
%{python2_sitearch}/libvirt_qemu.py*
%{python2_sitearch}/libvirt_lxc.py*
%{python2_sitearch}/libvirtmod*
%{python2_sitearch}/*egg-info
%endif
%if %{with_python3}