summaryrefslogtreecommitdiff
path: root/lang/python/files/python-host.mk
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2015-12-12 12:57:19 +0200
committerAlexandru Ardelean <ardeleanalex@gmail.com>2015-12-12 14:51:50 +0200
commitfdde13be29dcf21f41e235575ade38ae7f39d792 (patch)
treef397f715a633c48529f1f15fd40e8df8e4e15be6 /lang/python/files/python-host.mk
parent7aa4b19f97374b13ee7b43636e31c13bbfdf30f7 (diff)
python: fix HostPython again
Tested on python-setuptools. 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.mk29
1 files changed, 13 insertions, 16 deletions
diff --git a/lang/python/files/python-host.mk b/lang/python/files/python-host.mk
index f680c1c87..a40c2a3a2 100644
--- a/lang/python/files/python-host.mk
+++ b/lang/python/files/python-host.mk
@@ -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