diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 3a71d09b4..d9e8df9c4 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -20,8 +20,7 @@ PYTHON:=python$(PYTHON_VERSION) HOST_PYTHON_LIB_DIR:=$(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) HOST_PYTHON_BIN:=$(STAGING_DIR_HOST)/bin/python2 -PYTHONPATH:=$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR) -PYTHONPATH+=:$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR) +PYTHONPATH:=$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR) define HostPython ( export PYTHONPATH="$(PYTHONPATH)"; \ export PYTHONOPTIMIZE=""; \ @@ -39,6 +38,14 @@ ifdef CONFIG_USE_MIPS16 endif define PyPackage + + # Add default PyPackage filespec none defined + ifndef PyPackage/$(1)/filespec + define PyPackage/$(1)/filespec + +|$(PYTHON_PKG_DIR) + endef + endif + $(call shexport,PyPackage/$(1)/filespec) define Package/$(1)/install @@ -46,6 +53,7 @@ define PyPackage @echo "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)" | ( \ IFS='|'; \ while read fop fspec fperm; do \ + fop=`echo "$$$$$$$$fop" | tr -d ' \t\n'`; \ if [ "$$$$$$$$fop" = "+" ]; then \ if [ ! -e "$(PKG_INSTALL_DIR)$$$$$$$$fspec" ]; then \ echo "File not found '$(PKG_INSTALL_DIR)$$$$$$$$fspec'"; \ @@ -98,3 +106,4 @@ define Build/Compile/PyMod ) find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f endef +