Ubuntu: Fix PY_SITE_PACKAGES_PATH

PY_SITE_PACKAGES_PATH is set to the first element site.getsitepackages(), which
(correctly, but in this case undesirably) is below /usr/local. Use the first
path which is not.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-11-13 12:49:27 +00:00
commit 921a929cd3

View file

@ -10,7 +10,7 @@ endif
ifeq ($(DEVELOPMENT),true) ifeq ($(DEVELOPMENT),true)
PY_SITE_PACKAGES_PATH := $(PREFIX)/python$(PYTHON_VERSION)/site-packages PY_SITE_PACKAGES_PATH := $(PREFIX)/python$(PYTHON_VERSION)/site-packages
else else
PY_SITE_PACKAGES_PATH := $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])") PY_SITE_PACKAGES_PATH := $(shell $(PYTHON) -c "import site; print([d for d in site.getsitepackages() if d.find('/local/') == -1][0])")
endif endif
ifndef PY_PREREQ_BUILD ifndef PY_PREREQ_BUILD