From f40114e5b56522890ffe7d9fab80dfc0fecf2ac2 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Wed, 27 Mar 2019 18:41:02 +0100 Subject: fix pip3 invocation --- Makefile.in | 4 ++-- configure.ac | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 1a7f2b0..8f5ae5b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -40,9 +40,9 @@ devinstall: $(templates) install-data # install into prefix .PHONY: install install: $(templates) install-data - @pip3 install . --install-option="--prefix=@prefix@" + @pip3 install . @DEBIAN_PIP3_SYSTEM@ --install-option="--prefix=@prefix@" @# force update when sources changed - @pip3 install . --install-option="--prefix=@prefix@" --upgrade --no-deps + @pip3 install . @DEBIAN_PIP3_SYSTEM@ --install-option="--prefix=@prefix@" --upgrade --no-deps cd talersurvey/survey/static/web-common && make install && cd - # run testcases diff --git a/configure.ac b/configure.ac index 58f5b5e..5e349d2 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,19 @@ if test $? -ne 0; AC_MSG_ERROR([Please install pip3>=6.0]) fi +# On Debian systems, we may need to pass "--system" to pip3 to get +# to the desired installation target directory +pip3 install --help | grep '\-\-system' >> /dev/null +if test $? -ne 0; +then + DEBIAN_PIP3_SYSTEM="" +else + DEBIAN_PIP3_SYSTEM="--system" +fi +AC_SUBST(DEBIAN_PIP3_SYSTEM) + + + VERSION=$(pip3 --version | $AWK '{ print $2 }') AC_MSG_RESULT([$VERSION]) -- cgit v1.2.3