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 <lslebodn@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Petr Spacek 2016-11-11 12:37:03 +01:00 committed by Martin Basti
parent 27e7a89a62
commit 46b6b9e309
2 changed files with 16 additions and 6 deletions

View File

@ -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

View File

@ -419,6 +419,8 @@ else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL([VERBOSE_MAKE], [test "x${AM_DEFAULT_VERBOSITY}" == "x1"])
dnl ---------------------------------------------------------------------------
dnl Linters
dnl ---------------------------------------------------------------------------