Patchwork [v3,1/2] python-distribute: add nativesdk to BBCLASSEXTEND

login
register
mail settings
Submitter João Henrique Freitas
Date July 18, 2014, 3:09 a.m.
Message ID <1405652966-7359-2-git-send-email-joaohf@gmail.com>
Download mbox | patch
Permalink /patch/75977/
State Accepted
Commit f07c17dcee56c8c020b965bf62d81209a6d2eca4
Headers show

Comments

João Henrique Freitas - July 18, 2014, 3:09 a.m.
Without this, python tools that need python-distribute doesn't install
in SDK generated by OE.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
---
 meta/recipes-devtools/python/python-distribute_0.6.32.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-devtools/python/python-distribute_0.6.32.bb b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
index 58bb8b4..7000145 100644
--- a/meta/recipes-devtools/python/python-distribute_0.6.32.bb
+++ b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
@@ -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"