From 73eb682edb67f44aead7f2c70e9e8777e87df898 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 14 Dec 2015 14:03:14 -0500 Subject: python: Fix xmlrpclib imports. Fix imports of xmlrpclib to be compatible with Python 3. Python 2 had xmlrpclib (client) and SimpleXMLRPCServer (server). In Python 3, these have been renamed to xmlrpc.client and xmlrpc.server. The solution implemented here is to use the six library. It may seem excessive for this particular issue, but the six library provides helpers for Python 2 and 3 compatibility for many different issues. This is just the first of many uses of the six library. Signed-off-by: Russell Bryant Acked-by: Ben Pfaff --- m4/openvswitch.m4 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'm4') diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index 6d4e5da9c..0149c3078 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -341,6 +341,12 @@ else: fi done done + if test $ovs_cv_python != no; then + if test -x "$ovs_cv_python" && ! "$ovs_cv_python" -c 'import six' >/dev/null 2>&1; then + ovs_cv_python=no + AC_MSG_WARN([Missing Python six library.]) + fi + fi fi]) AC_SUBST([HAVE_PYTHON]) AM_MISSING_PROG([PYTHON], [python]) -- cgit v1.2.1