[oe] [meta-python][PATCH] meta-python: make python-chardet coexist for both python2 and python3

Khem Raj raj.khem at gmail.com
Thu Aug 2 09:05:10 UTC 2018


Hi Dima
On Thu, Aug 2, 2018 at 1:20 AM Dima Zavin <dmitriyz at waymo.com> wrote:
>
> Signed-off-by: Dima Zavin <dmitriyz at waymo.com>
> ---
>  meta-python/recipes-devtools/python/python-chardet.inc | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/meta-python/recipes-devtools/python/python-chardet.inc b/meta-python/recipes-devtools/python/python-chardet.inc
> index 246a65aa6..1a85e7410 100644
> --- a/meta-python/recipes-devtools/python/python-chardet.inc
> +++ b/meta-python/recipes-devtools/python/python-chardet.inc
> @@ -22,3 +22,10 @@ RDEPENDS_${PN}_class-target += " \
>      ${PYTHON_PN}-argparse \
>      ${PYTHON_PN}-logging \
>  "
> +
> +do_install_append () {
> +    maj_ver=$(echo ${PYTHON_BASEVERSION} | cut -d . -f 1)
> +    if [ "$maj_ver" == "3" ] ; then
> +        mv ${D}${bindir}/chardetect ${D}${bindir}/chardetect3
> +    fi
> +}

Its better to do the renaming in recipe for python3 version of this
module for help see how its
done for cython

> --
> 2.18.0.597.ga71716f1ad-goog
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel



More information about the Openembedded-devel mailing list