fi
dnl Allow perl/python overrides
-AC_PATH_PROGS([PYTHON], [python3 python2 python])
+AC_PATH_PROGS([PYTHON], [python3])
if test -z "$PYTHON"; then
- AC_MSG_ERROR(['python3', 'python2' or 'python' binary is required to build libvirt])
+ AC_MSG_ERROR(['python3' binary is required to build libvirt])
fi
AC_PATH_PROG([FLAKE8], [flake8])
if test -z "$FLAKE8"; then
%define with_bash_completion 0%{!?_without_bash_completion:1}
-# 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}
# numad is used to manage the CPU and memory placement dynamically,
# it's not available on many non-x86 architectures.
%else
BuildRequires: perl
%endif
-BuildRequires: %{python}
+BuildRequires: python3
BuildRequires: systemd-units
%if %{with_libxl}
BuildRequires: xen-devel
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# This is the API builder, it parses the C sources and build the
# API formal description in XML.
# daniel@veillard.com
#
-from __future__ import print_function
-
import os
import sys
import glob
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2012-2019 Red Hat, Inc.
#
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2013-2019 Red Hat, Inc.
#
# a lot of auto-generation of code, so when these don't match
# problems occur, preventing auth from succeeding at all.
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2013-2019 Red Hat, Inc.
#
# detected EnsureACL call recorded.
#
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2013-2019 Red Hat, Inc.
#
# <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2013-2019 Red Hat, Inc.
#
# <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2012-2019 Red Hat, Inc.
#
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
-from __future__ import print_function
-
import re
import subprocess
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (C) 2012-2019 Red Hat, Inc.
#
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
-from __future__ import print_function
-
import os.path
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2011-2019 Red Hat, Inc.
#
# python dtrace2systemtap.py probes.d > libvirt_probes.stp
#
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# esx_vi_generator.py: generates most of the SOAP type mapping code
# <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
-
import sys
import os
import os.path
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2012-2019 Red Hat, Inc.
#
# <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2011-2019 Red Hat, Inc.
#
# python gensystemtap.py */*.x > libvirt_functions.stp
#
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2018-2019 Red Hat, Inc.
#
# ....content....
# #endif /* SYMBOL */
-from __future__ import print_function
-
import os.path
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# hyperv_wmi_generator.py: generates most of the WMI type mapping code
# <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
-
import sys
import os
import os.path
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2018-2019 Red Hat, Inc.
#
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2017-2019 Red Hat, Inc.
#
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2016-2019 Red Hat, Inc.
#
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
-from __future__ import print_function
-
import re
import sys
-#!/usr/bin/env python
+#!/usr/bin/env python3
# reformat-news.py: Reformat the NEWS file properly
#
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
-from __future__ import print_function
-
import sys
COLUMNS = 80
cpuid -1r
echo
-for python in python3 python2; do
- $python <<EOF
-from __future__ import print_function
+python3 <<EOF
from struct import pack, unpack
from fcntl import ioctl
import sys, errno
pass
EOF
- if [[ $? -eq 0 ]]; then
- break
- fi
-done
-
qemu=qemu-system-x86_64
for cmd in /usr/bin/$qemu /usr/bin/qemu-kvm /usr/libexec/qemu-kvm; do
if [[ -x $cmd ]]; then