diff options
| author | Alexandru Ardelean <ardeleanalex@gmail.com> | 2015-12-11 12:01:21 +0200 |
|---|---|---|
| committer | Alexandru Ardelean <ardeleanalex@gmail.com> | 2015-12-11 16:01:27 +0200 |
| commit | c55641331e892b8bf4a7a8ae4883a85c713704af (patch) | |
| tree | 7f603d1af3af8233657ffc9ab49798b226640929 /lang/python/files/python-host.mk | |
| parent | 8054747a4932c1bff14d842cbe2e2e8d90b061a7 (diff) | |
python: unify HostPython and HostHostPython functions
That means basically moving the host Python from $(STAGING_DIR_HOST)
to $(STAGING_DIR_HOST)/usr and making the PYTHONPATH var
as an argument.
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.mk | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lang/python/files/python-host.mk b/lang/python/files/python-host.mk index ed0ef4159..d3b795e01 100644 --- a/lang/python/files/python-host.mk +++ b/lang/python/files/python-host.mk @@ -7,11 +7,14 @@ HOST_PYTHON_INC_DIR:=$(STAGING_DIR_HOST)/include/python$(PYTHON_VERSION) -HOST_PYTHON_PKG_DIR:=/lib/python$(PYTHON_VERSION)/site-packages +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 HostHostPython - ( export PYTHONPATH="$(HOST_PYTHONPATH)"; \ +define HostPython + ifeq ($(3),) + $(3):=$(PYTHONPATH) + endif + ( export PYTHONPATH="$(3)"; \ export PYTHONOPTIMIZE=""; \ export PYTHONDONTWRITEBYTECODE=1; \ export _python_sysroot="$(STAGING_DIR_HOST)"; \ @@ -25,15 +28,15 @@ endef # These configure args are needed in detection of path to Python header files # using autotools. HOST_CONFIGURE_ARGS += \ - _python_sysroot="$(STAGING_DIR_HOST)" \ - _python_prefix="" \ - _python_exec_prefix="" + _python_sysroot="$(STAGING_DIR_HOST)/usr" \ + _python_prefix="/usr" \ + _python_exec_prefix="/usr" # $(1) => build subdir # $(2) => additional arguments to setup.py # $(3) => additional variables define Build/Compile/HostPyMod - $(call HostHostPython, \ + $(call HostPython, \ cd $(HOST_BUILD_DIR)/$(strip $(1)); \ CC="$(HOSTCC)" \ CCSHARED="$(HOSTCC) $(HOST_FPIC)" \ @@ -48,6 +51,8 @@ define Build/Compile/HostPyMod $(3) \ , \ ./setup.py $(2) \ + , \ + $(HOST_PYTHONPATH) \ ) endef |
