From 452986bec416f00ac7fd573a460b9374d47fbf54 Mon Sep 17 00:00:00 2001 From: Daniel Elstner Date: Wed, 2 Sep 2015 14:07:06 +0200 Subject: [PATCH] Build: Fix installation of Python bindings Apparently setup.py install behaves differently when given the --root option, so omit that if DESTDIR is empty. Fixes #644. --- Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 36b19c03..c9ee604d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -580,7 +580,8 @@ $(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \ python-install: $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)" - $(setup_py) install --root "$(DESTDIR)/" --prefix "$(prefix)" --exec-prefix "$(exec_prefix)" + destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \ + --prefix "$(prefix)" --exec-prefix "$(exec_prefix)" python-clean: -$(AM_V_at)rm -f $(PDIR)/timestamp