From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mail.openembedded.org (Postfix) with ESMTP id 452917032B for ; Thu, 17 Jul 2014 00:50:34 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id hy10so3193077vcb.4 for ; Wed, 16 Jul 2014 17:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=dqX8fu4L6duabG0qvCd+xODfVdypD/4Ew2abOiidW8w=; b=p3hr/3KZuZlyDENEXIKmT8Q9iAkXBQmUjTDl5YD8w6zAKckB8ZLNp/A2U5SDysANtC 3HjO+m+qZlAw9Dz8dU9wPr52dHBA2SgT8UNWywBi7gx71h/W3jxxO78catZxkBHA1fPF 5GV+20eqtyAnmizF1/ytLB+Fc6bZ3RREKt9NJ1DAsANnQZ/jXxPOVWk90pz+JIgQRg5b jaMwZ06sVCHEFe4MiFxYexNuA4rM0wSM201LK8HnK08v5j79sI2IvxpOqyiEk8plcWX0 hFEU/BLUu5CTC7BJNy724l/GRwvG6J10TQUpLxbytjgNKl/WMVHqtYScArwcixCu1xHB WsBg== X-Received: by 10.221.26.71 with SMTP id rl7mr7173753vcb.69.1405558235091; Wed, 16 Jul 2014 17:50:35 -0700 (PDT) Received: from [192.168.0.12] ([201.53.220.248]) by mx.google.com with ESMTPSA id ty7sm1741281vdc.24.2014.07.16.17.50.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jul 2014 17:50:34 -0700 (PDT) Message-ID: <53C71DCF.9040702@gmail.com> Date: Wed, 16 Jul 2014 21:50:23 -0300 From: =?UTF-8?B?Sm/Do28gSGVucmlxdWUgRmVycmVpcmEgZGUgRnJlaXRhcw==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Otavio Salvador References: <1404266329-13524-1-git-send-email-joaohf@gmail.com> <1405378518-4832-1-git-send-email-joaohf@gmail.com> <1405378518-4832-2-git-send-email-joaohf@gmail.com> In-Reply-To: Cc: Patches and discussions about the oe-core layer Subject: Re: [PATCH v2 1/2] python-distribute: add nativesdk to BBCLASSEXTEND X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2014 00:50:42 -0000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Otavio, Em 15-07-2014 10:35, Otavio Salvador escreveu: > On Mon, Jul 14, 2014 at 7:55 PM, João Henrique Ferreira de Freitas > 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 >> --- >> 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 ? 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? 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 Thanks. -- João Henrique Ferreira de Freitas - joaohf_at_gmail.com Campinas-SP-Brasil