mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-05 16:21:59 +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:
@ -58,7 +58,7 @@ BuildRequires: python3-lxml
|
|||||||
|
|
||||||
# Don't want provides for python shared objects
|
# Don't want provides for python shared objects
|
||||||
%if %{with_python2}
|
%if %{with_python2}
|
||||||
%{?filter_provides_in: %filter_provides_in %{python_sitearch}/.*\.so}
|
%{?filter_provides_in: %filter_provides_in %{python2_sitearch}/.*\.so}
|
||||||
%endif
|
%endif
|
||||||
%if %{with_python3}
|
%if %{with_python3}
|
||||||
%{?filter_provides_in: %filter_provides_in %{python3_sitearch}/.*\.so}
|
%{?filter_provides_in: %filter_provides_in %{python3_sitearch}/.*\.so}
|
||||||
@ -118,7 +118,7 @@ exit 1
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_python2}
|
%if %{with_python2}
|
||||||
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
|
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
|
||||||
%endif
|
%endif
|
||||||
%if %{with_python3}
|
%if %{with_python3}
|
||||||
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
||||||
@ -126,7 +126,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with_python2}
|
%if %{with_python2}
|
||||||
%{__python} setup.py install --skip-build --root=%{buildroot}
|
%{__python2} setup.py install --skip-build --root=%{buildroot}
|
||||||
%endif
|
%endif
|
||||||
%if %{with_python3}
|
%if %{with_python3}
|
||||||
%{__python3} setup.py install --skip-build --root=%{buildroot}
|
%{__python3} setup.py install --skip-build --root=%{buildroot}
|
||||||
@ -134,7 +134,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with_python2}
|
%if %{with_python2}
|
||||||
%{__python} setup.py test
|
%{__python2} setup.py test
|
||||||
%endif
|
%endif
|
||||||
%if %{with_python3}
|
%if %{with_python3}
|
||||||
%{__python3} setup.py test
|
%{__python3} setup.py test
|
||||||
@ -143,11 +143,11 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
|||||||
%if %{with_python2}
|
%if %{with_python2}
|
||||||
%files -n python2-libvirt
|
%files -n python2-libvirt
|
||||||
%doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/
|
%doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/
|
||||||
%{python_sitearch}/libvirt.py*
|
%{python2_sitearch}/libvirt.py*
|
||||||
%{python_sitearch}/libvirt_qemu.py*
|
%{python2_sitearch}/libvirt_qemu.py*
|
||||||
%{python_sitearch}/libvirt_lxc.py*
|
%{python2_sitearch}/libvirt_lxc.py*
|
||||||
%{python_sitearch}/libvirtmod*
|
%{python2_sitearch}/libvirtmod*
|
||||||
%{python_sitearch}/*egg-info
|
%{python2_sitearch}/*egg-info
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_python3}
|
%if %{with_python3}
|
||||||
|
Reference in New Issue
Block a user