From 46b6b9e3091d08412912c37f46af497ddd0b8afb Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Fri, 11 Nov 2016 12:37:03 +0100 Subject: [PATCH] Build: support --enable-silent-rules for Python packages Setuptools will print only warnings. The option has to be used before setuptools command specification, otherwise it will not apply to sub-commands. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Lukas Slebodnik Reviewed-By: Christian Heimes --- Makefile.python.am | 20 ++++++++++++++------ configure.ac | 2 ++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Makefile.python.am b/Makefile.python.am index 0ea3fcf16..c9c1a1fc5 100644 --- a/Makefile.python.am +++ b/Makefile.python.am @@ -1,18 +1,26 @@ pkgname = $(shell basename "$(abs_srcdir)") pkgpythondir = $(pythondir)/$(pkgname) +if VERBOSE_MAKE +VERBOSITY="--verbose" +else +VERBOSITY="--quiet" +endif !VERBOSE_MAKE + all-local: - cd $(srcdir); $(PYTHON) setup.py build \ - --build-base "$(abs_builddir)/build" \ - --verbose + cd $(srcdir); $(PYTHON) setup.py \ + $(VERBOSITY) \ + build \ + --build-base "$(abs_builddir)/build" install-exec-local: - $(PYTHON) $(srcdir)/setup.py install \ + $(PYTHON) $(srcdir)/setup.py \ + $(VERBOSITY) \ + install \ --prefix "$(DESTDIR)$(prefix)" \ --single-version-externally-managed \ --record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ - --optimize 1 \ - --verbose + --optimize 1 uninstall-local: cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf diff --git a/configure.ac b/configure.ac index 4d0b09c71..b04245593 100644 --- a/configure.ac +++ b/configure.ac @@ -419,6 +419,8 @@ else AC_MSG_RESULT(no) fi +AM_CONDITIONAL([VERBOSE_MAKE], [test "x${AM_DEFAULT_VERBOSITY}" == "x1"]) + dnl --------------------------------------------------------------------------- dnl Linters dnl ---------------------------------------------------------------------------