summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorRussell Bryant <russell@ovn.org>2015-12-14 14:03:14 -0500
committerRussell Bryant <russell@ovn.org>2016-01-20 16:43:15 -0500
commit73eb682edb67f44aead7f2c70e9e8777e87df898 (patch)
treea00ec92b3064f258eee85340e8c9b4f26dc93c25 /m4
parent0a96a21b6ee67d7cde2abd72a3a5bd290ac618d5 (diff)
downloadopenvswitch-73eb682edb67f44aead7f2c70e9e8777e87df898.tar.gz
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 <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'm4')
-rw-r--r--m4/openvswitch.m46
1 files changed, 6 insertions, 0 deletions
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])