On Wed, Jul 16, 2014 at 9:50 PM, João Henrique Ferreira de Freitas <joa...@gmail.com> wrote: > Em 15-07-2014 10:35, Otavio Salvador escreveu: >> On Mon, Jul 14, 2014 at 7:55 PM, João Henrique Ferreira de Freitas >> <joa...@gmail.com> wrote: >>> >>> 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 <joa...@gmail.com> >>> --- >>> meta/recipes-devtools/python/python-distribute_0.6.32.bb | 8 +++++++- >>> 1 file changed, 7 insertions(+), 1 deletion(-) >>> >>> 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} >>> +} >> >> Couldn't this be done unconditionally for all target types? >> "/usr/bin/env python" should work fine in target as well, no? >> > I don't know if I fully understood your question... > > > Do you mean by 'all target types' like native, nativesdk ?
Yes. To do it in do_install_append and change it for all targets ... > In some recipes (gnome-doc-utils.inc, createrepo_0.4.11.bb) , this pattern > was used: > > ---- > # Wrap the python script since the native python is > # ${bindir}/python-native/python, and the "#! /usr/bin/env python" can't > # find it since it is not in PATH. > do_install_append_class-native () { > ... > sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' $i > ... > } > ---- > > Sometimes I feel really lost when need to fixes things like that. What is > the correct way? I think the above answer my question, it need to be nativepython for native so it indeed must to be different. > Without do_install_append_class-nativesdk() I got: > > Computing transaction...error: Can't install > nativesdk-python-distribute-0.6.32-ml5@x86_64_nativesdk: no package provides > /usr/bin/python Your fix is fine than. Sorry for the noise :-) -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core