From ab9f42d6eeefeaca2e4a5a9acfbb07b428be4616 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 23 Feb 2017 14:12:22 +0100 Subject: Python build: use --build-base everywhere Some calls to setup.py specified a build base, some did not. This can lead to issues, e.g. build, clean and install are using different build directories. Signed-off-by: Christian Heimes Reviewed-By: Martin Basti --- Makefile.python.am | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/Makefile.python.am b/Makefile.python.am index e4efc1749..4b9dc1d2b 100644 --- a/Makefile.python.am +++ b/Makefile.python.am @@ -17,17 +17,19 @@ all-local: $(top_builddir)/ipasetup.py cd $(srcdir); $(PYTHON) setup.py \ $(VERBOSITY) \ build \ - --build-base "$(abs_builddir)/build" + --build-base "$(abs_builddir)/build" install-exec-local: $(top_builddir)/ipasetup.py if [ "x$(pkginstall)" = "xtrue" ]; then \ $(PYTHON) $(srcdir)/setup.py \ $(VERBOSITY) \ + build \ + --build-base "$(abs_builddir)/build" \ install \ - --prefix "$(DESTDIR)$(prefix)" \ - --single-version-externally-managed \ - --record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ - --optimize 1; \ + --prefix "$(DESTDIR)$(prefix)" \ + --single-version-externally-managed \ + --record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ + --optimize 1; \ fi uninstall-local: @@ -37,7 +39,10 @@ uninstall-local: rm -rf "$(DESTDIR)$(pkgpythondir)" clean-local: $(top_builddir)/ipasetup.py - $(PYTHON) "$(srcdir)/setup.py" clean --all + $(PYTHON) "$(srcdir)/setup.py" \ + clean \ + --all + --build-base "$(abs_builddir)/build" rm -rf "$(srcdir)/build" "$(srcdir)/dist" "$(srcdir)/MANIFEST" find "$(srcdir)" \ -name "*.py[co]" -delete -o \ @@ -59,4 +64,8 @@ WHEELDISTDIR = $(top_builddir)/dist/wheels .PHONY: bdist_wheel bdist_wheel: $(top_builddir)/ipasetup.py rm -rf $(WHEELDISTDIR)/$(pkgname)-*.whl - $(PYTHON) "$(srcdir)/setup.py" bdist_wheel --dist-dir=$(WHEELDISTDIR) + $(PYTHON) "$(srcdir)/setup.py" \ + build \ + --build-base "$(abs_builddir)/build" \ + bdist_wheel \ + --dist-dir=$(WHEELDISTDIR) -- cgit