python-distribute: add nativesdk to BBCLASSEXTEND
authorJoão Henrique Ferreira de Freitas <joaohf@gmail.com>
Fri, 18 Jul 2014 03:09:25 +0000 (00:09 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Jul 2014 23:08:58 +0000 (00:08 +0100)
Without this, python tools that need python-distribute doesn't install
in SDK generated by OE.

(From OE-Core rev: 778a00c3dd656bbfac03274b5f60788518f7b964)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python-distribute_0.6.32.bb

index 58bb8b4..7000145 100644 (file)
@@ -39,6 +39,12 @@ do_install_append() {
     echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
 }
 
+do_install_append_class-nativesdk() {
+       sed -i -e '1s|^#!.*|#!/usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/distribute-${PV}-py${PYTHON_BASEVERSION}.egg/setuptools/tests/test_resources.py
+       sed -i -e '1s|^#!.*|#!/usr/bin/env python|' ${D}${bindir}/easy_install
+       sed -i -e '1s|^#!.*|#!/usr/bin/env python|' ${D}${bindir}/easy_install-${PYTHON_BASEVERSION}
+}
+
 RDEPENDS_${PN} = "\
   python-distutils \
   python-compression \
@@ -46,4 +52,4 @@ RDEPENDS_${PN} = "\
 
 RPROVIDES_${PN} += "python-setuptools"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"