python: fix compile error
[openwrt/svn-archive/archive.git] / lang / python / files / python-package.mk
index 64b65da94461f3ea87886d9caeabdcbfc8b91da6..f1bbf010ff203151736f7843b784ef96ff1b5f1a 100644 (file)
@@ -4,9 +4,8 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
-PYTHON_VERSION=2.5
+PYTHON_VERSION=2.6
 
 PYTHON_DIR:=$(STAGING_DIR)/usr
 PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
@@ -21,28 +20,28 @@ define PyPackage
   $(call shexport,PyPackage/$(1)/filespec)
 
   define Package/$(1)/install
-       @getvar $$(call shvar,PyPackage/$(1)/filespec) | ( \
+       @$(SH_FUNC) getvar $$(call shvar,PyPackage/$(1)/filespec) | ( \
                IFS='|'; \
                while read fop fspec fperm; do \
                  if [ "$$$$$$$$fop" = "+" ]; then \
-                   dpath=`dirname "$$$$$$$$fspec"`; \
-                   if [ -n "$$$$$$$$fperm" ]; then \
-                     dperm="-m$$$$$$$$fperm"; \
-                   else \
-                     dperm=`stat -c "%a" $(PKG_INSTALL_DIR)$$$$$$$$dpath`; \
-                   fi; \
-                   mkdir -p $$$$$$$$$dperm $$(1)$$$$$$$$dpath; \
-                   echo "copying: '$$$$$$$$fspec'"; \
-                   cp -fpR $(PKG_INSTALL_DIR)$$$$$$$$fspec $$(1)$$$$$$$$dpath/; \
-                   if [ -n "$$$$$$$$fperm" ]; then \
-                     chmod -R $$$$$$$$fperm $$(1)$$$$$$$$fspec; \
-                   fi; \
+                       dpath=`dirname "$$$$$$$$fspec"`; \
+                       if [ -n "$$$$$$$$fperm" ]; then \
+                         dperm="-m$$$$$$$$fperm"; \
+                       else \
+                         dperm=`stat -c "%a" $(PKG_INSTALL_DIR)$$$$$$$$dpath`; \
+                       fi; \
+                       mkdir -p $$$$$$$$$dperm $$(1)$$$$$$$$dpath; \
+                       echo "copying: '$$$$$$$$fspec'"; \
+                       cp -fpR $(PKG_INSTALL_DIR)$$$$$$$$fspec $$(1)$$$$$$$$dpath/; \
+                       if [ -n "$$$$$$$$fperm" ]; then \
+                         chmod -R $$$$$$$$fperm $$(1)$$$$$$$$fspec; \
+                       fi; \
                  elif [ "$$$$$$$$fop" = "-" ]; then \
-                   echo "removing: '$$$$$$$$fspec'"; \
-                   rm -fR $$(1)$$$$$$$$fspec; \
+                       echo "removing: '$$$$$$$$fspec'"; \
+                       rm -fR $$(1)$$$$$$$$fspec; \
                  elif [ "$$$$$$$$fop" = "=" ]; then \
-                   echo "setting permissions: '$$$$$$$$fperm' on '$$$$$$$$fspec'"; \
-                   chmod -R $$$$$$$$fperm $$(1)$$$$$$$$fspec; \
+                       echo "setting permissions: '$$$$$$$$fperm' on '$$$$$$$$fspec'"; \
+                       chmod -R $$$$$$$$fperm $$(1)$$$$$$$$fspec; \
                  fi; \
                done; \
        )
@@ -56,7 +55,7 @@ define Build/Compile/PyMod
                CPPFLAGS="$(TARGET_CPPFLAGS)" \
                LDFLAGS="$(TARGET_LDFLAGS)" \
                $(3) \
-               $(PYTHON) ./setup.py $(2); \
+               $(PYTHON) ./setup.py $(2) && \
                find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f \
        );
 endef