tests: Use compat argparse when required.
[sliver-openvswitch.git] / tests / atlocal.in
index 0166f0f..7f09143 100644 (file)
@@ -9,3 +9,12 @@ export PYTHONPATH
 
 PYTHONIOENCODING=utf_8
 export PYTHONIOENCODING
+
+if test $HAVE_PYTHON = yes; then
+    if python -m argparse 2>/dev/null; then
+        :
+    else
+        PYTHONPATH=$PYTHONPATH:$abs_top_srcdir/python/compat
+        export PYTHONPATH
+   fi
+fi