Permalink
Browse files

Remove version check for pip

Was previously using / testing pip's "--root" option incorrectly (i.e. an empty
argument was supplied when doing non-root installations, or a relative path was
used), leading to a restriction of what version of pip we would allow (since it
pip would otherwise fail).  Use --root appropriately and remove version check
accordingly.

Signed-off-by: Chris Goldsworthy <christopher.goldsworthy@outlook.com>
[Jan: fixed ifneq syntax error, beautified PIP_ROOT assignment]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information...
c4goldsw authored and jan-kiszka committed Jul 22, 2018
1 parent 5c91643 commit e42151c29778648d20ca0c8815aad2d73a96ab75
Showing with 7 additions and 3 deletions.
  1. +5 −1 Makefile
  2. +1 −1 scripts/include.mk
  3. +1 −1 tools/Makefile
View
@@ -32,6 +32,10 @@ DOXYGEN ?= doxygen
kbuild = -C $(KDIR) M=$$PWD $@
ifneq ($(DESTDIR),)
PIP_ROOT = --root=$(shell readlink -f $(DESTDIR))
endif
modules clean:
$(Q)$(MAKE) $(kbuild)
@@ -50,7 +54,7 @@ tool_inmates_install: $(DESTDIR)$(libexecdir)/jailhouse
pyjailhouse_install:
ifeq ($(strip $(PYTHON_PIP_USABLE)), yes)
$(PIP) install --upgrade --force-reinstall --root=$(DESTDIR) .
$(PIP) install --upgrade --force-reinstall $(PIP_ROOT) .
else
@
endif
View
@@ -45,7 +45,7 @@ INSTALL_DIR ?= $(INSTALL) -d -m 755
PYTHON ?= python
PIP := $(PYTHON) -m pip
ifeq ($(strip $(shell $(PIP) -V 2> /dev/null | awk '{split($$2,a,"."); if(a[1]>=10) print "y" }')), y)
ifeq ($(strip $(shell $(PIP) > /dev/null 2> /dev/null && echo "y")), y)
PYTHON_PIP_USABLE := yes
endif
View
@@ -55,7 +55,7 @@ install-libexec install-data:
install::
$(info WARNING: Could not install Python-based helpers. You need \
Python and pip version >= 10 in order to install them.)
Python and pip in order to install them.)
endif # !PYTHON_PIP_USABLE
HAS_PYTHON_MAKO := \

0 comments on commit e42151c

Please sign in to comment.