Skip to content

Commit

Permalink
build: disable pylint check by default
Browse files Browse the repository at this point in the history
Disable the pylint check in src/bindings/python/flux by default.
Introduce a new `--enable-pylint` option to configure to enable the
check at configure time.

Fixes flux-framework#1250
  • Loading branch information
grondo committed Oct 25, 2017
1 parent 39fd3cb commit bd4fee8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,17 @@ if test "$enable_python" = "yes"; then
fi
AM_CONDITIONAL([HAVE_PYTHON], [test "$enable_python" = yes])

AC_ARG_ENABLE([pylint],
[AS_HELP_STRING([--enable-pylint],
[Enable pylint checks of python bindings])],,
[enable_pylint="yes"]
)
AS_IF([test "x$enable_pylint" = "xyes"], [
AC_CHECK_PROG(PYLINT,[pylint],[pylint])
AS_IF([test "x$PYLINT" != "xpylint"], [AC_MSG_ERROR([No pylint found in PATH])])
])
AM_CONDITIONAL([ENABLE_PYLINT], [test "x$PYLINT" = "xpylint"])

AX_PROG_LUA([5.1],[5.3])
AX_LUA_HEADERS
AX_LUA_LIBS
Expand Down
2 changes: 2 additions & 0 deletions src/bindings/python/flux/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ lib-copy: ${fluxpy_PYTHON} ${fluxpy_LTLIBRARIES}
done
[ "$(top_srcdir)" != "$(top_builddir)" ] && cp $(top_srcdir)/src/bindings/python/flux/*.py ./ || true

if ENABLE_PYLINT
#TODO: there must be a better way to do this
# scan flux bindings with pylint, currently fails on any exit but 0
check-local: lib-copy
if [ -x "$$( which pylint )" ] ; then pylint --rcfile=$(top_srcdir)/src/bindings/python/.pylintrc ../flux ; fi
endif

all-local: lib-copy

Expand Down

0 comments on commit bd4fee8

Please sign in to comment.