python: fix HostPython again 2115/head
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Sat, 12 Dec 2015 10:57:19 +0000 (12:57 +0200)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Sat, 12 Dec 2015 12:51:50 +0000 (14:51 +0200)
Tested on python-setuptools.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/files/python-host.mk

index f680c1c87e3498ea8bf2c18db71ae9317860c280..a40c2a3a2806827e58cb4b84c7b4ec4019de68b1 100644 (file)
@@ -11,22 +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 ($(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="$(LOCAL_PYTHONPATH)"; \
-               export PYTHONOPTIMIZE=""; \
-               export PYTHONDONTWRITEBYTECODE=1; \
-               export _python_sysroot="$(LOCAL_STAGING_DIR)/usr"; \
-               export _python_prefix="/usr"; \
-               export _python_exec_prefix="/usr"; \
-               $(1) \
-               $(HOST_PYTHON_BIN) $(2); \
-       )
+       if [ "$(strip $(3))" == "HOST" ]; then \
+               export PYTHONPATH:=$(HOST_PYTHONPATH); \
+               export _python_sysroot="$(STAGING_DIR_HOST)/usr"; \
+       else \
+               exort PYTHONPATH:=$(PYTHONPATH); \
+               export _python_sysroot:=$(STAGING_DIR)/usr; \
+       fi; \
+       export PYTHONOPTIMIZE=""; \
+       export PYTHONDONTWRITEBYTECODE=1; \
+       export _python_prefix="/usr"; \
+       export _python_exec_prefix="/usr"; \
+       $(1) \
+       $(HOST_PYTHON_BIN) $(2);
 endef
 
 # These configure args are needed in detection of path to Python header files