[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [dbus PATCH 2/3] configure: Detect flake8 automatically



This also allows the user to run a custom flake8
by setting FLAKE8 in the environment.

Signed-off-by: Andrea Bolognani <abologna redhat com>
---
 Makefile.am  | 2 +-
 configure.ac | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index a0696bf..c6d09e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,6 +46,6 @@ gen-AUTHORS:
 # E501: (line too long) warning is ignored.
 .PHONY: flake8
 flake8:
-	flake8 --show-source --ignore=E501 $(srcdir)/tests/*.py
+	$(FLAKE8) --show-source --ignore=E501 $(srcdir)/tests/*.py;
 
 syntax-check: flake8
diff --git a/configure.ac b/configure.ac
index 1c0e246..8722255 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,7 @@ AC_PROG_MKDIR_P
 AM_PROG_CC_C_O
 AC_PROG_CC_STDC
 AC_PROG_LIBTOOL
+AC_PATH_PROGS([FLAKE8], [flake8])
 
 PKG_CHECK_MODULES([GIO2], [gio-unix-2.0 >= $GLIB2_REQUIRED])
 PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= $GLIB2_REQUIRED])
-- 
2.17.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]