提交 7093e8c7 编写于 作者: A Andrea Bolognani

spec: Use Python 3 for building when possible

While RHEL / CentOS are still using Python 2 for the time being,
Fedora has already switched to Python 3 as the default Python
interpreter a while ago, so on that OS it doesn't make sense to
drag in Python 2 anymore; the same applies to future RHEL versions.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 c229e01a
......@@ -202,6 +202,13 @@
%define with_bash_completion 0%{!?_without_bash_completion:1}
%endif
# Use Python 3 when possible, Python 2 otherwise
%if 0%{?fedora} || 0%{?rhel} > 7
%define python python3
%else
%define python python2
%endif
%if %{with_qemu} || %{with_lxc} || %{with_uml}
# numad is used to manage the CPU and memory placement dynamically,
......@@ -305,7 +312,7 @@ BuildRequires: perl-interpreter
%else
BuildRequires: perl
%endif
BuildRequires: python2
BuildRequires: %{python}
%if %{with_systemd}
BuildRequires: systemd-units
%endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册