From: Lei Feng Date: Tue, 1 Nov 2022 23:12:53 +0000 (+0800) Subject: EX-6279 lipe: need python and pylint for all builds X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=a0932b208c55ddefdc101a4c362a6b4deefcbbb1;p=fs%2Flustre-release.git EX-6279 lipe: need python and pylint for all builds Check python and pylint ready for all builds. Signed-off-by: Lei Feng Change-Id: I7e93ec3cdd51d96ed938f6fa85953b9e3f250877 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49012 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lipe/configure.ac b/lipe/configure.ac index 1ef9b9d..c90947f 100644 --- a/lipe/configure.ac +++ b/lipe/configure.ac @@ -194,19 +194,23 @@ AC_ARG_ENABLE([server], AC_MSG_RESULT([$enable_server]) AM_CONDITIONAL([BUILD_SERVER], [test x$enable_server = xyes]) -# ------- check for python -------- -AM_COND_IF([BUILD_SERVER], - [AC_CHECK_PROGS([PYTHON], [python3.6], []) - if test "x$PYTHON" = "x"; then - AC_MSG_ERROR([Python is needed for tests. Install python please.]) - fi]) +# ------- check for python >= 3.6 -------- +AC_CHECK_PROGS([PYTHON], [python3], []) +if test "x$PYTHON" = "x"; then + AC_MSG_ERROR([Python >= 3.6 is needed for lipe. Install python please.]) +fi + +ac_supports_python_ver=`$PYTHON -c "import sys; \ + print (sys.hexversion >= 0x3060000)"` +if test "$ac_supports_python_ver" != "True"; then + AC_MSG_ERROR([Python >= 3.6 is needed for lipe. Upgrade python please.]) +fi # ------- check for pylint -------- -AM_COND_IF([BUILD_SERVER], - [AC_CHECK_PROGS([PYLINT], [pylint-3.6], []) - if test "x$PYLINT" = "x"; then - AC_MSG_ERROR([pylint-3.6 is needed to check python coding style. Install pylint please.]) - fi]) +AC_CHECK_PROGS([PYLINT], [pylint-3], []) +if test "x$PYLINT" = "x"; then + AC_MSG_ERROR([pylint-3 is needed to check python coding style. Install pylint please.]) +fi # ------- check for libssh -------- AC_CHECK_LIB([ssh], [ssh_new], [