scons: wrap python invocations with helper script that attempts to find a non-3.x...
[openwrt/staging/yousong.git] / tools / scons / Makefile
index aadeb289a25952f48e00c35091c48f4e444acd63..83c1c584a5143d205e4957b8cd4d85787895bf9b 100644 (file)
@@ -23,7 +23,12 @@ define Host/Compile
 endef
 
 define Host/Install
-       python $(HOST_BUILD_DIR)/setup.py install --prefix=$(STAGING_DIR_HOST)
+       ./files/pywrap.sh $(HOST_BUILD_DIR)/setup.py install --prefix=$(STAGING_DIR_HOST)
+       rm -f $(STAGING_DIR_HOST)/bin/scons*.py
+       for bin in $(STAGING_DIR_HOST)/bin/scons*; do \
+               mv "$$$$bin" "$$$$bin.py";                \
+               cp ./files/pywrap.sh "$$$$bin";           \
+       done
 endef
 
 $(eval $(call HostBuild))