summaryrefslogtreecommitdiff
path: root/lang/python/files/python-host.mk
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2015-12-11 16:32:20 +0200
committerHannu Nyman <hannu.nyman@iki.fi>2015-12-11 16:32:20 +0200
commit995bdfdcfaa81d8f5ab2ca34c98b4bb341c9cb9c (patch)
tree05d836115bdfd9d3d7ac4f71b34cf9976dfa4412 /lang/python/files/python-host.mk
parentf0be8b0ea22cebe6542d57a0525fcc844ccbce4a (diff)
parenta8602a7ccbde983412b5f0f27961ff2ab9155194 (diff)
Merge pull request #2107 from commodo/python-2-7-11-upgrade
python: upgrade to version 2.7.11
Diffstat (limited to 'lang/python/files/python-host.mk')
-rw-r--r--lang/python/files/python-host.mk19
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