From 42c2ebcdadeb3aaf3ba128465b5fc58f027868ea Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Tue, 27 Sep 2011 15:31:18 -0700 Subject: [PATCH] tests: Use compat argparse when required. Some build environments don't have argparse installed. In these cases the test framework will use the compat version. --- tests/atlocal.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/atlocal.in b/tests/atlocal.in index 0166f0f0..7f09143f 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -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 -- 2.30.2