Build: always use Pylint from Python version used for rest of the build

configure option --with/without-pylint was replaced by
--enable/disable-pylint. Pylint is always called as $(PYTHON) -m python.

If you need to override Pylint version, use command "make pylint PYTHON=xxx".

https://fedorahosted.org/freeipa/ticket/157

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Petr Spacek 2016-12-08 11:26:18 +01:00 committed by Martin Basti
parent 21a0987601
commit 9c87c39e65
2 changed files with 13 additions and 10 deletions

View File

@ -164,7 +164,7 @@ pylint: $(top_builddir)/ipapython/version.py ipasetup.py
-name '*.py' -print -o \
-type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
echo "Pylint is running, please wait ..."; \
PYTHONPATH=$(top_srcdir) $(PYLINT) \
PYTHONPATH=$(top_srcdir) $(PYTHON) -m pylint \
--rcfile=$(top_srcdir)/pylintrc $${FILES}
.PHONY: jslint jslint-ui jslint-ui-test jslint-html \

View File

@ -435,16 +435,19 @@ AC_ARG_ENABLE([i18ntests],
AC_SUBST([i18ntests])
AM_CONDITIONAL([WITH_POLINT], [test "x${enable_i18ntests}" == "xyes"])
AC_ARG_WITH([pylint],
AS_HELP_STRING([--with-pylint=path],
[path to Pylint]),
dnl --without-pylint will set PYLINT=no
[PYLINT=$with_pylint],
[AC_PATH_PROG([PYLINT], [pylint])]
AC_ARG_ENABLE([pylint],
AS_HELP_STRING([--disable-pylint],
[skip Pylint in make lint target]),
[PYLINT=no],
[PYLINT=yes
AC_MSG_CHECKING([for Pylint])
$PYTHON -m pylint --version > /dev/null
if test "$?" != "0"; then
AC_MSG_ERROR([cannot find pylint for $PYTHON])
fi
AC_MSG_RESULT([yes])
]
)
if test "x${PYLINT}" == "x"; then
AC_MSG_ERROR([cannot find Pylint])
fi
AC_SUBST([PYLINT])
AM_CONDITIONAL([WITH_PYLINT], [test "x${PYLINT}" != "xno"])