From 9eb1b9da387d65cc27b1aa6e3e75f7f001adba81 Mon Sep 17 00:00:00 2001 From: Tino Didriksen Date: Sat, 14 Sep 2019 13:36:50 +0000 Subject: [PATCH] Support PYTHON_INSTALL_PARAMS to help with packaging --- configure.ac | 6 ++++++ python/Makefile.am | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a10f9fe5..d98e3c90 100644 --- a/configure.ac +++ b/configure.ac @@ -151,4 +151,10 @@ AC_ARG_ENABLE([python-bindings], [enable_python_bindings=no]) AM_CONDITIONAL([HAVE_PYTHON_BINDINGS], [test x$enable_python_bindings = xyes]) +AC_ARG_VAR([PYTHON_INSTALL_PARAMS], [Parameters to pass to the Python 3 module install step]) +if test "x$PYTHON_INSTALL_PARAMS" = "x" +then + PYTHON_INSTALL_PARAMS="--prefix=\$(prefix) --root=\$(DESTDIR)/" +fi + AC_OUTPUT([Makefile lttoolbox.pc lttoolbox/Makefile python/Makefile]) diff --git a/python/Makefile.am b/python/Makefile.am index 1d46a7ed..39f031dd 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -6,4 +6,4 @@ BUILT_SOURCES = %_wrap.cpp.cpp $(PYTHON) setup.py build install-exec-local: - $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) + $(PYTHON) setup.py install $(PYTHON_INSTALL_PARAMS)