mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2024-10-26 16:25:10 +03:00
Adapt to rename of py2 RPMs from python- to python2- prefix
Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
53a6d49660
commit
8dfa907b2f
@ -18,6 +18,12 @@
|
|||||||
%define _with_python3 1
|
%define _with_python3 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Whether py2 packages are assumed to have python2- name prefix
|
||||||
|
%define py2_versioned_deps 0
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
|
%define py2_versioned_deps 1
|
||||||
|
%endif
|
||||||
|
|
||||||
%{!?with_python2: %define with_python2 %{_with_python2}}
|
%{!?with_python2: %define with_python2 %{_with_python2}}
|
||||||
%{!?with_python3: %define with_python3 %{_with_python3}}
|
%{!?with_python3: %define with_python3 %{_with_python3}}
|
||||||
|
|
||||||
@ -31,10 +37,16 @@ License: LGPLv2+
|
|||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
BuildRequires: libvirt-devel >= @C_VERSION@
|
BuildRequires: libvirt-devel >= @C_VERSION@
|
||||||
%if %{with_python2}
|
%if %{with_python2}
|
||||||
|
%if %{py2_versioned_deps}
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-nose
|
||||||
|
BuildRequires: python2-lxml
|
||||||
|
%else
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-nose
|
BuildRequires: python-nose
|
||||||
BuildRequires: python-lxml
|
BuildRequires: python-lxml
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{with_python3}
|
%if %{with_python3}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python3-nose
|
||||||
|
Loading…
Reference in New Issue
Block a user