summaryrefslogtreecommitdiff
path: root/lang/python/files/python-host.mk
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2015-12-11 17:13:21 +0200
committerAlexandru Ardelean <ardeleanalex@gmail.com>2015-12-11 17:13:21 +0200
commit779643e35823d4f8ca22fe460dffd38104b51df7 (patch)
treed15a9d98cd3d08bde2d9fb6834afe9c4bb6ea8b6 /lang/python/files/python-host.mk
parentb01a391c5ea89501f8241baeb071c4a7e1314284 (diff)
python: fix HostPython host/target selection
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'lang/python/files/python-host.mk')
-rw-r--r--lang/python/files/python-host.mk18
1 files changed, 11 insertions, 7 deletions
diff --git a/lang/python/files/python-host.mk b/lang/python/files/python-host.mk
index d3b795e01..f680c1c87 100644
--- a/lang/python/files/python-host.mk
+++ b/lang/python/files/python-host.mk
@@ -11,15 +11,19 @@ HOST_PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(STAGING_DIR_HOST)/$(HOST_PYTHON_PKG_DIR)
define HostPython
- ifeq ($(3),)
- $(3):=$(PYTHONPATH)
+ ifeq ($(strip $(3)),HOST)
+ LOCAL_PYTHONPATH:=$(HOST_PYTHONPATH)
+ LOCAL_STAGING_DIR:=$(STAGING_DIR_HOST)
+ else
+ LOCAL_PYTHONPATH:=$(PYTHONPATH)
+ LOCAL_STAGING_DIR:=$(STAGING_DIR)
endif
- ( export PYTHONPATH="$(3)"; \
+ ( export PYTHONPATH="$(LOCAL_PYTHONPATH)"; \
export PYTHONOPTIMIZE=""; \
export PYTHONDONTWRITEBYTECODE=1; \
- export _python_sysroot="$(STAGING_DIR_HOST)"; \
- export _python_prefix=""; \
- export _python_exec_prefix=""; \
+ export _python_sysroot="$(LOCAL_STAGING_DIR)/usr"; \
+ export _python_prefix="/usr"; \
+ export _python_exec_prefix="/usr"; \
$(1) \
$(HOST_PYTHON_BIN) $(2); \
)
@@ -52,7 +56,7 @@ define Build/Compile/HostPyMod
, \
./setup.py $(2) \
, \
- $(HOST_PYTHONPATH) \
+ HOST \
)
endef