[pygobject] Do not fail tests if pyflakes or pep8 are not installed



commit 1e056e4f4a19fd1139187467677c2592c2722290
Author: Martin Pitt <martinpitt gnome org>
Date:   Mon Aug 20 11:52:08 2012 +0200

    Do not fail tests if pyflakes or pep8 are not installed
    
    These tools might not be desirable in restricted build environments or
    backports, and e. g. Fedora patches those out. So let the tests work without
    these tools.

 tests/Makefile.am |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a3de105..1d13630 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -107,9 +107,9 @@ RUN_TESTS_ENV_VARS= \
 
 check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
 	@echo "  CHECK  Pyflakes"
-	@pyflakes $(top_srcdir)
+	@type pyflakes >/dev/null 2>&1 && pyflakes $(top_srcdir) || echo "skipped, pyflakes not installed"
 	@echo "  CHECK  PEP8"
-	@pep8 --ignore=E501,E123,E124 --repeat --show-source $(top_srcdir)
+	@type pep8 >/dev/null 2>&1 && pep8 --ignore=E501,E123,E124 --repeat --show-source $(top_srcdir) || echo "skipped, pep8 not installed"
 	$(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning $(srcdir)/runtests.py
 
 check.gdb:



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