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

Andrea Bolognani posted 3 patches 6 years ago
[libvirt] [dbus PATCH 2/3] configure: Detect flake8 automatically
Posted by Andrea Bolognani 6 years ago
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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus PATCH 2/3] configure: Detect flake8 automatically
Posted by Pino Toscano 6 years ago
On Tuesday, 14 August 2018 17:30:45 CEST Andrea Bolognani wrote:
> 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;

Extra ';' at the end of this line.

-- 
Pino Toscano--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list