|
|
@ -1,9 +1,6 @@ |
|
|
|
# -*- rpm-spec -*- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%define min_rhel 6 |
|
|
|
%define min_rhel 6 |
|
|
|
%define min_fedora 25 |
|
|
|
%define min_fedora 25 |
|
|
|
%define supported_platform 1 |
|
|
|
%define supported_platform 1 |
|
|
|
|
|
|
|
|
|
|
|
%define _with_python2 1 |
|
|
|
%define _with_python2 1 |
|
|
|
%define _with_python3 1 |
|
|
|
%define _with_python3 1 |
|
|
|
# Whether py2 packages are assumed to have python2- name prefix |
|
|
|
# Whether py2 packages are assumed to have python2- name prefix |
|
|
@ -14,7 +11,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
Summary: The libvirt virtualization API python2 binding |
|
|
|
Summary: The libvirt virtualization API python2 binding |
|
|
|
Name: libvirt-python |
|
|
|
Name: libvirt-python |
|
|
|
Version: 5.6.0 |
|
|
|
Version: 6.2.0 |
|
|
|
Release: 1%{?dist}%{?extra_release} |
|
|
|
Release: 1%{?dist}%{?extra_release} |
|
|
|
Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz |
|
|
|
Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz |
|
|
|
Url: http://libvirt.org |
|
|
|
Url: http://libvirt.org |
|
|
@ -101,28 +98,15 @@ echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}" |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
%endif |
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
|
|
%if %{with_python2} |
|
|
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build |
|
|
|
|
|
|
|
%endif |
|
|
|
|
|
|
|
%if %{with_python3} |
|
|
|
%if %{with_python3} |
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build |
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build |
|
|
|
%endif |
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
|
|
%install |
|
|
|
%install |
|
|
|
%if %{with_python2} |
|
|
|
|
|
|
|
%{__python} setup.py install --skip-build --root=%{buildroot} |
|
|
|
|
|
|
|
%endif |
|
|
|
|
|
|
|
%if %{with_python3} |
|
|
|
|
|
|
|
%{__python3} setup.py install --skip-build --root=%{buildroot} |
|
|
|
%{__python3} setup.py install --skip-build --root=%{buildroot} |
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check |
|
|
|
%check |
|
|
|
%if %{with_python2} |
|
|
|
|
|
|
|
%{__python} setup.py test |
|
|
|
|
|
|
|
%endif |
|
|
|
|
|
|
|
%if %{with_python3} |
|
|
|
|
|
|
|
%{__python3} setup.py test |
|
|
|
%{__python3} setup.py test |
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with_python2} |
|
|
|
%if %{with_python2} |
|
|
|
%files -n python2-libvirt |
|
|
|
%files -n python2-libvirt |
|
|
|