All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-python][PATCH] meta-python: make python-chardet coexist for both python2 and python3
@ 2018-08-02  8:20 Dima Zavin
  2018-08-02  9:05 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Dima Zavin @ 2018-08-02  8:20 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Dima Zavin <dmitriyz@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
+}
-- 
2.18.0.597.ga71716f1ad-goog



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-python][PATCH] meta-python: make python-chardet coexist for both python2 and python3
  2018-08-02  8:20 [meta-python][PATCH] meta-python: make python-chardet coexist for both python2 and python3 Dima Zavin
@ 2018-08-02  9:05 ` Khem Raj
  2018-08-05  0:33   ` [meta-python][PATCH v2] python3-chardet: add a '3' suffix to binary to avoid conflicts with python2 Dima Zavin
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2018-08-02  9:05 UTC (permalink / raw)
  To: dmitriyz; +Cc: openembeded-devel

Hi Dima
On Thu, Aug 2, 2018 at 1:20 AM Dima Zavin <dmitriyz@waymo.com> wrote:
>
> Signed-off-by: Dima Zavin <dmitriyz@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@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [meta-python][PATCH v2] python3-chardet: add a '3' suffix to binary to avoid conflicts with python2
  2018-08-02  9:05 ` Khem Raj
@ 2018-08-05  0:33   ` Dima Zavin
  0 siblings, 0 replies; 3+ messages in thread
From: Dima Zavin @ 2018-08-05  0:33 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Dima Zavin <dmitriyz@waymo.com>
---
 meta-python/recipes-devtools/python/python3-chardet_3.0.4.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta-python/recipes-devtools/python/python3-chardet_3.0.4.bb b/meta-python/recipes-devtools/python/python3-chardet_3.0.4.bb
index 038043c56..38d8122ce 100644
--- a/meta-python/recipes-devtools/python/python3-chardet_3.0.4.bb
+++ b/meta-python/recipes-devtools/python/python3-chardet_3.0.4.bb
@@ -1,2 +1,7 @@
 inherit setuptools3
 require python-chardet.inc
+
+do_install_append () {
+    # rename scripts that would conflict with the Python 2 build of chardet
+    mv ${D}${bindir}/chardetect ${D}${bindir}/chardetect3
+}
-- 
2.18.0.597.ga71716f1ad-goog



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-05  0:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-02  8:20 [meta-python][PATCH] meta-python: make python-chardet coexist for both python2 and python3 Dima Zavin
2018-08-02  9:05 ` Khem Raj
2018-08-05  0:33   ` [meta-python][PATCH v2] python3-chardet: add a '3' suffix to binary to avoid conflicts with python2 Dima Zavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.