[OE-core] [PATCH 2/2] python[3]native: allow use of both native Python 2 and 3

Khem Raj raj.khem at gmail.com
Fri Aug 3 03:24:37 UTC 2018


On Thu, Aug 2, 2018 at 3:50 PM Burton, Ross <ross.burton at intel.com> wrote:

> The last to be inherited behaviour?  That's the same as the current
> behaviour, apart from after my change both pythons are available via
> PATH.
>
> The only change is that inheriting the second class doesn't wipe out
> the first class.


Ok may be then this variable should be made overridable so a recipe can
select it to be one of two otherwise the default remains as you said

>
>
> Ross
>
> On 2 August 2018 at 22:05, Khem Raj <raj.khem at gmail.com> wrote:
> >
> >
> > On Tue, Jul 31, 2018 at 10:06 AM Ross Burton <ross.burton at intel.com>
> wrote:
> >>
> >> Instead of both classes using ${PYTHON_PN} (which is set by python-dir
> and
> >> python3-dir), hardcode the right values so that it is possible to
> inherit
> >> both
> >> pythonnative and python3native at the same time.
> >>
> >> If both are inherited then both native Pythons are available, but the
> last
> >> to be
> >> inherited will be the one to set PYTHON.
> >
> >
> > Not particularly thrilled about this usage it seems error prone
> >>
> >>
> >>
> >> Signed-off-by: Ross Burton <ross.burton at intel.com>
> >> ---
> >>  meta/classes/python3native.bbclass | 6 +++---
> >>  meta/classes/pythonnative.bbclass  | 6 +++---
> >>  2 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/meta/classes/python3native.bbclass
> >> b/meta/classes/python3native.bbclass
> >> index 89665efee8b..da12a714703 100644
> >> --- a/meta/classes/python3native.bbclass
> >> +++ b/meta/classes/python3native.bbclass
> >> @@ -1,8 +1,8 @@
> >>  inherit python3-dir
> >>
> >> -PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
> >> -EXTRANATIVEPATH += "${PYTHON_PN}-native"
> >> -DEPENDS_append = " ${PYTHON_PN}-native "
> >> +PYTHON="${STAGING_BINDIR_NATIVE}/python3-native/python3"
> >> +EXTRANATIVEPATH += "python3-native"
> >> +DEPENDS_append = " python3-native "
> >>
> >>  # python-config and other scripts are using distutils modules
> >>  # which we patch to access these variables
> >> diff --git a/meta/classes/pythonnative.bbclass
> >> b/meta/classes/pythonnative.bbclass
> >> index 4cc8b2769c2..ae6600cd155 100644
> >> --- a/meta/classes/pythonnative.bbclass
> >> +++ b/meta/classes/pythonnative.bbclass
> >> @@ -1,11 +1,11 @@
> >>
> >>  inherit python-dir
> >>
> >> -PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
> >> +PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
> >>  # PYTHON_EXECUTABLE is used by cmake
> >>  PYTHON_EXECUTABLE="${PYTHON}"
> >> -EXTRANATIVEPATH += "${PYTHON_PN}-native"
> >> -DEPENDS_append = " ${PYTHON_PN}-native "
> >> +EXTRANATIVEPATH += "python-native"
> >> +DEPENDS_append = " python-native "
> >>
> >>  # python-config and other scripts are using distutils modules
> >>  # which we patch to access these variables
> >> --
> >> 2.11.0
> >>
> >> --
> >> _______________________________________________
> >> Openembedded-core mailing list
> >> Openembedded-core at lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180802/6f9a0d2e/attachment-0002.html>


More information about the Openembedded-core mailing list