From 591af75d2e62244ecd5270d1c6f0f2df9bff76f4 Mon Sep 17 00:00:00 2001 From: Xuefer Date: Sat, 13 Dec 2014 18:12:03 +0800 Subject: [PATCH 1/3] python: whitespace fix for PYTHONPATH Seems that using += adds a space in the PYTHONPATH. Could be some other error, but at least this way it's sure to not leave any spaces. Thanks @Xuefer. Signed-off-by: Xuefer Tinys Signed-off-by: Alexandru Ardelean --- lang/python/files/python-package.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 3a71d09b4..9a999d4f0 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=""; \ From 9b94e3cb6eab07e6ba44ca74ea5ffc19f39d0bd7 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Tue, 6 Jan 2015 10:48:52 +0200 Subject: [PATCH 2/3] python: trim all whitespaces for the operator in the filespec That would allow for files (in filespecs) to be indented. As it is now, the files need to be added at the begginning of the line. Signed-off-by: Alexandru Ardelean --- lang/python/files/python-package.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 9a999d4f0..71d500d1d 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -45,6 +45,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'"; \ From 8b86c1528afe73e858596b248fef4bc5a64da321 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Mon, 15 Dec 2014 10:19:12 +0200 Subject: [PATCH 3/3] python: add default PyPackage/filespec if not defined Most packages will install in /usr/lib/python$(PYTHON_VERSION)/site-packages Signed-off-by: Alexandru Ardelean --- lang/python/files/python-package.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 71d500d1d..d9e8df9c4 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -38,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 @@ -98,3 +106,4 @@ define Build/Compile/PyMod ) find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f endef +