python: add PYTHONPATH var; this allows packages to configure it
authorAlexandru Ardelean <aa@ocedo.com>
Wed, 5 Nov 2014 13:18:05 +0000 (15:18 +0200)
committerAlexandru Ardelean <aa@ocedo.com>
Fri, 7 Nov 2014 13:37:18 +0000 (15:37 +0200)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/files/python-package.mk

index 9e48ffc6132137942489cb7b13520e3f5daf77f2..3f714d27f03912fbdf11b88d13d30d01f8f5addd 100644 (file)
@@ -20,8 +20,9 @@ PYTHON:=python$(PYTHON_VERSION)
 HOST_PYTHON_LIB_DIR:=$(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION)
 HOST_PYTHON_BIN:=$(STAGING_DIR_HOST)/bin/python2
 
+PYTHONPATH:=$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR)
 define HostPython
-       (       export PYTHONPATH="$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR)"; \
+       (       export PYTHONPATH="$(PYTHONPATH)"; \
                export PYTHONOPTIMIZE=""; \
                export PYTHONDONTWRITEBYTECODE=1; \
                $(1) \