All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3
@ 2020-01-27 17:36 Andrey Zhizhikin
  2020-01-27 17:36 ` [meta-oe][PATCH 2/3] libteam: " Andrey Zhizhikin
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Andrey Zhizhikin @ 2020-01-27 17:36 UTC (permalink / raw)
  To: openembedded-devel

From: Andrey Zhizhikin <andrey.z@gmail.com>

Update pcsc-lite recipe to target python3 since python2 is EOL and has
been dropped from OE-Core.

Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
 .../0001-pcsc-spy-use-python3-only.patch      | 43 +++++++++++++++++++
 .../pcsc-lite/pcsc-lite_1.8.26.bb             |  7 ++-
 2 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch

diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
new file mode 100644
index 000000000..3e7b0adda
--- /dev/null
+++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
@@ -0,0 +1,43 @@
+From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Mon, 27 Jan 2020 13:27:12 +0000
+Subject: [PATCH] pcsc-spy: use python3 only
+
+Python2 has been EOL and most distributions would not provide any
+support for it anymore. Since Python3 is available in all distributions
+now, switch pcsc-spy to use it exclusively.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+---
+ src/spy/pcsc-spy | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
+index 85222c6..965138e 100755
+--- a/src/spy/pcsc-spy
++++ b/src/spy/pcsc-spy
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#!/usr/bin/env python3
+ 
+ """
+ #    Display PC/SC functions arguments
+@@ -22,12 +22,7 @@ from __future__ import print_function
+ import os
+ import signal
+ import time
+-try:
+-    # for Python3
+-    from queue import Queue
+-except ImportError:
+-    # for Python2
+-    from Queue import Queue
++from queue import Queue
+ from threading import Thread
+ from operator import attrgetter
+ 
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
index 5e6084656..fb8c4a202 100644
--- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
+++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
@@ -10,7 +10,10 @@ LICENSE_${PN}-spy = "GPLv3+"
 LICENSE_${PN}-spy-dev = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=628c01ba985ecfa21677f5ee2d5202f6"
 
-SRC_URI = "https://pcsclite.apdu.fr/files/${BP}.tar.bz2"
+SRC_URI = "\
+	https://pcsclite.apdu.fr/files/${BP}.tar.bz2 \
+	file://0001-pcsc-spy-use-python3-only.patch \
+"
 SRC_URI[md5sum] = "9d36882998449daceec267c68a21ff0d"
 SRC_URI[sha256sum] = "3eb7be7d6ef618c0a444316cf5c1f2f9d7227aedba7a192f389fe3e7c0dfbbd9"
 
@@ -50,6 +53,6 @@ RPROVIDES_${PN} += "${PN}-systemd"
 RREPLACES_${PN} += "${PN}-systemd"
 RCONFLICTS_${PN} += "${PN}-systemd"
 SYSTEMD_SERVICE_${PN} = "pcscd.socket"
-RDEPENDS_${PN}-spy +="python"
+RDEPENDS_${PN}-spy +="python3"
 
 BBCLASSEXTEND = "native"
-- 
2.17.1



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

* [meta-oe][PATCH 2/3] libteam: update recipe to use python3
  2020-01-27 17:36 [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3 Andrey Zhizhikin
@ 2020-01-27 17:36 ` Andrey Zhizhikin
  2020-01-27 17:36 ` [meta-oe][PATCH 3/3] libhugetlbfs: " Andrey Zhizhikin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Andrey Zhizhikin @ 2020-01-27 17:36 UTC (permalink / raw)
  To: openembedded-devel

From: Andrey Zhizhikin <andrey.z@gmail.com>

Update recipe to use python3 since python2 is EOL and has been dropped
from OE-Core.

Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
 ...asic_test.py-use-python3-interpreter.patch | 28 +++++++++++++++++++
 .../recipes-support/libteam/libteam/run-ptest |  2 +-
 .../recipes-support/libteam/libteam_1.29.bb   |  3 +-
 3 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-use-python3-interpreter.patch

diff --git a/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-use-python3-interpreter.patch b/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-use-python3-interpreter.patch
new file mode 100644
index 000000000..e27e4f329
--- /dev/null
+++ b/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-use-python3-interpreter.patch
@@ -0,0 +1,28 @@
+From 571c141b434dff13494c6a3afe621f63a8e610e9 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Mon, 27 Jan 2020 14:29:34 +0000
+Subject: [PATCH] team_basic_test.py: use python3 interpreter
+
+Use python3 since python2 is EOL and has been removed from several
+distributions.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+---
+ scripts/team_basic_test.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/team_basic_test.py b/scripts/team_basic_test.py
+index b05be9e..ad980e8 100755
+--- a/scripts/team_basic_test.py
++++ b/scripts/team_basic_test.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python3
+ """
+ Basic test.
+ 
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-support/libteam/libteam/run-ptest b/meta-oe/recipes-support/libteam/libteam/run-ptest
index 4ba5acf05..b5c6f4ebb 100644
--- a/meta-oe/recipes-support/libteam/libteam/run-ptest
+++ b/meta-oe/recipes-support/libteam/libteam/run-ptest
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python $(dirname $0)/team_basic_test.py
+python3 $(dirname $0)/team_basic_test.py
diff --git a/meta-oe/recipes-support/libteam/libteam_1.29.bb b/meta-oe/recipes-support/libteam/libteam_1.29.bb
index 821ca1938..26c475053 100644
--- a/meta-oe/recipes-support/libteam/libteam_1.29.bb
+++ b/meta-oe/recipes-support/libteam/libteam_1.29.bb
@@ -11,6 +11,7 @@ SRC_URI = "git://github.com/jpirko/libteam \
            file://0001-include-sys-select.h-for-fd_set-definition.patch \
            file://0002-teamd-Re-adjust-include-header-order.patch \
            file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \
+           file://0001-team_basic_test.py-use-python3-interpreter.patch \
            file://run-ptest \
            "
 SRCREV = "e897f02bf2403d4859a99e090e34ea768b4c0540"
@@ -32,7 +33,7 @@ FILES_${PN}-utils = "${bindir}/bond2team \
 "
 
 RDEPENDS_${PN}-utils = "bash"
-RDEPENDS_${PN}-ptest = "python"
+RDEPENDS_${PN}-ptest = "python3"
 
 do_install_ptest() {
 	install ${S}/scripts/team_basic_test.py ${D}${PTEST_PATH}/
-- 
2.17.1



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

* [meta-oe][PATCH 3/3] libhugetlbfs: update recipe to use python3
  2020-01-27 17:36 [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3 Andrey Zhizhikin
  2020-01-27 17:36 ` [meta-oe][PATCH 2/3] libteam: " Andrey Zhizhikin
@ 2020-01-27 17:36 ` Andrey Zhizhikin
  2020-01-27 20:16 ` [meta-oe][PATCH 1/3] pcsc-lite: " Andreas Oberritter
  2020-01-27 20:59 ` [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3 Andrey Zhizhikin
  3 siblings, 0 replies; 12+ messages in thread
From: Andrey Zhizhikin @ 2020-01-27 17:36 UTC (permalink / raw)
  To: openembedded-devel

From: Andrey Zhizhikin <andrey.z@gmail.com>

Update recipe to use python3 since python2 is EOL and has been dropped
from OE-Core.

Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
 ...setup_helper-use-python3-interpreter.patch | 29 +++++++++++++++++++
 .../libhugetlbfs/libhugetlbfs_git.bb          |  3 +-
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch

diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch
new file mode 100644
index 000000000..e45f283b3
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch
@@ -0,0 +1,29 @@
+From b77c61de4d88d2c6e5d31f4f5a5877cc4c61272e Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Mon, 27 Jan 2020 17:27:55 +0000
+Subject: [PATCH] huge_page_setup_helper: use python3 interpreter
+
+Setup helper script is already prepared to be used with python3, use the
+interpreter explicitly. This removes dependency to python2 and will not
+fail the QA check.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+---
+ huge_page_setup_helper.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/huge_page_setup_helper.py b/huge_page_setup_helper.py
+index a9ba2bf..7ba0c92 100755
+--- a/huge_page_setup_helper.py
++++ b/huge_page_setup_helper.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ 
+ #
+ # Tool to set up Linux large page support with minimal effort
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
index f1a4efba2..7f7f83828 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
@@ -4,7 +4,7 @@ LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 DEPENDS = "sysfsutils"
-RDEPENDS_${PN} += "bash python python-io python-lang python-subprocess python-resource"
+RDEPENDS_${PN} += "bash python3 python3-core"
 RDEPENDS_${PN}-tests += "bash python3-core"
 
 PV = "2.22"
@@ -25,6 +25,7 @@ SRC_URI = " \
     file://0005-Include-dirent.h-for-ino_t.patch \
     file://0006-include-limits.h-for-PATH_MAX.patch \
     file://0001-tests-add-explicit-permissions-to-open-call.patch \
+    file://0001-huge_page_setup_helper-use-python3-interpreter.patch \
 "
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
-- 
2.17.1



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

* Re: [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3
  2020-01-27 17:36 [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3 Andrey Zhizhikin
  2020-01-27 17:36 ` [meta-oe][PATCH 2/3] libteam: " Andrey Zhizhikin
  2020-01-27 17:36 ` [meta-oe][PATCH 3/3] libhugetlbfs: " Andrey Zhizhikin
@ 2020-01-27 20:16 ` Andreas Oberritter
  2020-01-27 22:42   ` Andrey Zhizhikin
  2020-01-27 20:59 ` [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3 Andrey Zhizhikin
  3 siblings, 1 reply; 12+ messages in thread
From: Andreas Oberritter @ 2020-01-27 20:16 UTC (permalink / raw)
  To: Andrey Zhizhikin; +Cc: openembedded-devel

Hi Andrey,

On Mon, 27 Jan 2020 17:36:06 +0000
Andrey Zhizhikin <andrey.z@gmail.com> wrote:

> From: Andrey Zhizhikin <andrey.z@gmail.com>
> 
> Update pcsc-lite recipe to target python3 since python2 is EOL and has
> been dropped from OE-Core.
> 
> Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> ---
>  .../0001-pcsc-spy-use-python3-only.patch      | 43 +++++++++++++++++++
>  .../pcsc-lite/pcsc-lite_1.8.26.bb             |  7 ++-
>  2 files changed, 48 insertions(+), 2 deletions(-)
>  create mode 100644 meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> 
> diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> new file mode 100644
> index 000000000..3e7b0adda
> --- /dev/null
> +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> @@ -0,0 +1,43 @@
> +From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
> +From: Andrey Zhizhikin <andrey.z@gmail.com>
> +Date: Mon, 27 Jan 2020 13:27:12 +0000
> +Subject: [PATCH] pcsc-spy: use python3 only
> +
> +Python2 has been EOL and most distributions would not provide any
> +support for it anymore. Since Python3 is available in all distributions
> +now, switch pcsc-spy to use it exclusively.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> +---
> + src/spy/pcsc-spy | 9 ++-------
> + 1 file changed, 2 insertions(+), 7 deletions(-)
> +
> +diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
> +index 85222c6..965138e 100755
> +--- a/src/spy/pcsc-spy
> ++++ b/src/spy/pcsc-spy
> +@@ -1,4 +1,4 @@
> +-#! /usr/bin/python
> ++#!/usr/bin/env python3
> + 
> + """
> + #    Display PC/SC functions arguments
> +@@ -22,12 +22,7 @@ from __future__ import print_function
> + import os
> + import signal
> + import time
> +-try:
> +-    # for Python3
> +-    from queue import Queue
> +-except ImportError:
> +-    # for Python2
> +-    from Queue import Queue
> ++from queue import Queue
> + from threading import Thread
> + from operator import attrgetter
> + 
> +-- 
> +2.17.1
> +

This patch would not have been necessary if we managed the python symlink with update-alternatives. I'm doing this in my layer. Maybe that would be a better way to go? I won't be able to build master in the next days or weeks, but if you want to try and submit it, here's what I have in my bbappends:

python_%.bbappend:

inherit update-alternatives

ALTERNATIVE_${PN}-core = "python"
ALTERNATIVE_TARGET[python] = "${bindir}/python2"
ALTERNATIVE_PRIORITY = "2"

do_install_append_class-target() {
    rm -f ${D}${bindir}/python
}

python3_%.bbappend:

inherit update-alternatives

ALTERNATIVE_${PN}-core = "python"
ALTERNATIVE_TARGET[python] = "${bindir}/python3"
ALTERNATIVE_PRIORITY = "3"

Best regards,
Andreas


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

* Re: [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3
  2020-01-27 17:36 [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3 Andrey Zhizhikin
                   ` (2 preceding siblings ...)
  2020-01-27 20:16 ` [meta-oe][PATCH 1/3] pcsc-lite: " Andreas Oberritter
@ 2020-01-27 20:59 ` Andrey Zhizhikin
  2020-01-27 21:03   ` Khem Raj
  3 siblings, 1 reply; 12+ messages in thread
From: Andrey Zhizhikin @ 2020-01-27 20:59 UTC (permalink / raw)
  To: openembeded-devel, Khem Raj

Hello Raj,

On Mon, Jan 27, 2020 at 6:36 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
>
> From: Andrey Zhizhikin <andrey.z@gmail.com>
>
> Update pcsc-lite recipe to target python3 since python2 is EOL and has
> been dropped from OE-Core.
>
> Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> ---
>  .../0001-pcsc-spy-use-python3-only.patch      | 43 +++++++++++++++++++
>  .../pcsc-lite/pcsc-lite_1.8.26.bb             |  7 ++-
>  2 files changed, 48 insertions(+), 2 deletions(-)
>  create mode 100644 meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
>
> diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> new file mode 100644
> index 000000000..3e7b0adda
> --- /dev/null
> +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> @@ -0,0 +1,43 @@
> +From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
> +From: Andrey Zhizhikin <andrey.z@gmail.com>
> +Date: Mon, 27 Jan 2020 13:27:12 +0000
> +Subject: [PATCH] pcsc-spy: use python3 only
> +
> +Python2 has been EOL and most distributions would not provide any
> +support for it anymore. Since Python3 is available in all distributions
> +now, switch pcsc-spy to use it exclusively.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> +---
> + src/spy/pcsc-spy | 9 ++-------
> + 1 file changed, 2 insertions(+), 7 deletions(-)
> +
> +diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
> +index 85222c6..965138e 100755
> +--- a/src/spy/pcsc-spy
> ++++ b/src/spy/pcsc-spy
> +@@ -1,4 +1,4 @@
> +-#! /usr/bin/python
> ++#!/usr/bin/env python3
> +
> + """
> + #    Display PC/SC functions arguments
> +@@ -22,12 +22,7 @@ from __future__ import print_function
> + import os
> + import signal
> + import time

Please take a note, that this block is different from the patch staged
in the [master-next] (ad388282aa2b6e286fc9f92d37d43cc061a6a753):
==================
> +-try:
> +-    # for Python3
> +-    from queue import Queue
> +-except ImportError:
> +-    # for Python2
> +-    from Queue import Queue
> ++from queue import Queue
==================

In addition to switching the interpreter, it also removes the block
which targets python2 as it does not make sense with explicit python3
interpreter invoked.

Not that I'm complaining that this patch was not taken :)
It might just be that you haven't seen the difference between this
patch and the one you picked up. Otherwise, if you feel that the
version staged is more correct - discard this patch.

> + from threading import Thread
> + from operator import attrgetter
> +
> +--
> +2.17.1
> +
> diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> index 5e6084656..fb8c4a202 100644
> --- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> @@ -10,7 +10,10 @@ LICENSE_${PN}-spy = "GPLv3+"
>  LICENSE_${PN}-spy-dev = "GPLv3+"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=628c01ba985ecfa21677f5ee2d5202f6"
>
> -SRC_URI = "https://pcsclite.apdu.fr/files/${BP}.tar.bz2"
> +SRC_URI = "\
> +       https://pcsclite.apdu.fr/files/${BP}.tar.bz2 \
> +       file://0001-pcsc-spy-use-python3-only.patch \
> +"
>  SRC_URI[md5sum] = "9d36882998449daceec267c68a21ff0d"
>  SRC_URI[sha256sum] = "3eb7be7d6ef618c0a444316cf5c1f2f9d7227aedba7a192f389fe3e7c0dfbbd9"
>
> @@ -50,6 +53,6 @@ RPROVIDES_${PN} += "${PN}-systemd"
>  RREPLACES_${PN} += "${PN}-systemd"
>  RCONFLICTS_${PN} += "${PN}-systemd"
>  SYSTEMD_SERVICE_${PN} = "pcscd.socket"
> -RDEPENDS_${PN}-spy +="python"
> +RDEPENDS_${PN}-spy +="python3"
>
>  BBCLASSEXTEND = "native"
> --
> 2.17.1
>


-- 
Regards,
Andrey.


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

* Re: [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3
  2020-01-27 20:59 ` [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3 Andrey Zhizhikin
@ 2020-01-27 21:03   ` Khem Raj
  2020-01-27 21:07     ` Andrey Zhizhikin
  0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2020-01-27 21:03 UTC (permalink / raw)
  To: Andrey Zhizhikin; +Cc: openembeded-devel

On Mon, Jan 27, 2020 at 12:59 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
>
> Hello Raj,
>
> On Mon, Jan 27, 2020 at 6:36 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> >
> > From: Andrey Zhizhikin <andrey.z@gmail.com>
> >
> > Update pcsc-lite recipe to target python3 since python2 is EOL and has
> > been dropped from OE-Core.
> >
> > Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > ---
> >  .../0001-pcsc-spy-use-python3-only.patch      | 43 +++++++++++++++++++
> >  .../pcsc-lite/pcsc-lite_1.8.26.bb             |  7 ++-
> >  2 files changed, 48 insertions(+), 2 deletions(-)
> >  create mode 100644 meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> >
> > diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > new file mode 100644
> > index 000000000..3e7b0adda
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > @@ -0,0 +1,43 @@
> > +From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
> > +From: Andrey Zhizhikin <andrey.z@gmail.com>
> > +Date: Mon, 27 Jan 2020 13:27:12 +0000
> > +Subject: [PATCH] pcsc-spy: use python3 only
> > +
> > +Python2 has been EOL and most distributions would not provide any
> > +support for it anymore. Since Python3 is available in all distributions
> > +now, switch pcsc-spy to use it exclusively.
> > +
> > +Upstream-Status: Pending
> > +
> > +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > +---
> > + src/spy/pcsc-spy | 9 ++-------
> > + 1 file changed, 2 insertions(+), 7 deletions(-)
> > +
> > +diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
> > +index 85222c6..965138e 100755
> > +--- a/src/spy/pcsc-spy
> > ++++ b/src/spy/pcsc-spy
> > +@@ -1,4 +1,4 @@
> > +-#! /usr/bin/python
> > ++#!/usr/bin/env python3
> > +
> > + """
> > + #    Display PC/SC functions arguments
> > +@@ -22,12 +22,7 @@ from __future__ import print_function
> > + import os
> > + import signal
> > + import time
>
> Please take a note, that this block is different from the patch staged
> in the [master-next] (ad388282aa2b6e286fc9f92d37d43cc061a6a753):
> ==================
> > +-try:
> > +-    # for Python3
> > +-    from queue import Queue
> > +-except ImportError:
> > +-    # for Python2
> > +-    from Queue import Queue
> > ++from queue import Queue
> ==================
>
> In addition to switching the interpreter, it also removes the block
> which targets python2 as it does not make sense with explicit python3
> interpreter invoked.
>
> Not that I'm complaining that this patch was not taken :)
> It might just be that you haven't seen the difference between this
> patch and the one you picked up. Otherwise, if you feel that the
> version staged is more correct - discard this patch.

I have missed it because this should have been v2 to get my attention.

>
> > + from threading import Thread
> > + from operator import attrgetter
> > +
> > +--
> > +2.17.1
> > +
> > diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > index 5e6084656..fb8c4a202 100644
> > --- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > @@ -10,7 +10,10 @@ LICENSE_${PN}-spy = "GPLv3+"
> >  LICENSE_${PN}-spy-dev = "GPLv3+"
> >  LIC_FILES_CHKSUM = "file://COPYING;md5=628c01ba985ecfa21677f5ee2d5202f6"
> >
> > -SRC_URI = "https://pcsclite.apdu.fr/files/${BP}.tar.bz2"
> > +SRC_URI = "\
> > +       https://pcsclite.apdu.fr/files/${BP}.tar.bz2 \
> > +       file://0001-pcsc-spy-use-python3-only.patch \
> > +"
> >  SRC_URI[md5sum] = "9d36882998449daceec267c68a21ff0d"
> >  SRC_URI[sha256sum] = "3eb7be7d6ef618c0a444316cf5c1f2f9d7227aedba7a192f389fe3e7c0dfbbd9"
> >
> > @@ -50,6 +53,6 @@ RPROVIDES_${PN} += "${PN}-systemd"
> >  RREPLACES_${PN} += "${PN}-systemd"
> >  RCONFLICTS_${PN} += "${PN}-systemd"
> >  SYSTEMD_SERVICE_${PN} = "pcscd.socket"
> > -RDEPENDS_${PN}-spy +="python"
> > +RDEPENDS_${PN}-spy +="python3"
> >
> >  BBCLASSEXTEND = "native"
> > --
> > 2.17.1
> >
>
>
> --
> Regards,
> Andrey.


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

* Re: [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3
  2020-01-27 21:03   ` Khem Raj
@ 2020-01-27 21:07     ` Andrey Zhizhikin
  2020-01-27 21:14       ` Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Andrey Zhizhikin @ 2020-01-27 21:07 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

On Mon, Jan 27, 2020 at 10:04 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Mon, Jan 27, 2020 at 12:59 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> >
> > Hello Raj,
> >
> > On Mon, Jan 27, 2020 at 6:36 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> > >
> > > From: Andrey Zhizhikin <andrey.z@gmail.com>
> > >
> > > Update pcsc-lite recipe to target python3 since python2 is EOL and has
> > > been dropped from OE-Core.
> > >
> > > Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > > ---
> > >  .../0001-pcsc-spy-use-python3-only.patch      | 43 +++++++++++++++++++
> > >  .../pcsc-lite/pcsc-lite_1.8.26.bb             |  7 ++-
> > >  2 files changed, 48 insertions(+), 2 deletions(-)
> > >  create mode 100644 meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > >
> > > diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > > new file mode 100644
> > > index 000000000..3e7b0adda
> > > --- /dev/null
> > > +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > > @@ -0,0 +1,43 @@
> > > +From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
> > > +From: Andrey Zhizhikin <andrey.z@gmail.com>
> > > +Date: Mon, 27 Jan 2020 13:27:12 +0000
> > > +Subject: [PATCH] pcsc-spy: use python3 only
> > > +
> > > +Python2 has been EOL and most distributions would not provide any
> > > +support for it anymore. Since Python3 is available in all distributions
> > > +now, switch pcsc-spy to use it exclusively.
> > > +
> > > +Upstream-Status: Pending
> > > +
> > > +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > > +---
> > > + src/spy/pcsc-spy | 9 ++-------
> > > + 1 file changed, 2 insertions(+), 7 deletions(-)
> > > +
> > > +diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
> > > +index 85222c6..965138e 100755
> > > +--- a/src/spy/pcsc-spy
> > > ++++ b/src/spy/pcsc-spy
> > > +@@ -1,4 +1,4 @@
> > > +-#! /usr/bin/python
> > > ++#!/usr/bin/env python3
> > > +
> > > + """
> > > + #    Display PC/SC functions arguments
> > > +@@ -22,12 +22,7 @@ from __future__ import print_function
> > > + import os
> > > + import signal
> > > + import time
> >
> > Please take a note, that this block is different from the patch staged
> > in the [master-next] (ad388282aa2b6e286fc9f92d37d43cc061a6a753):
> > ==================
> > > +-try:
> > > +-    # for Python3
> > > +-    from queue import Queue
> > > +-except ImportError:
> > > +-    # for Python2
> > > +-    from Queue import Queue
> > > ++from queue import Queue
> > ==================
> >
> > In addition to switching the interpreter, it also removes the block
> > which targets python2 as it does not make sense with explicit python3
> > interpreter invoked.
> >
> > Not that I'm complaining that this patch was not taken :)
> > It might just be that you haven't seen the difference between this
> > patch and the one you picked up. Otherwise, if you feel that the
> > version staged is more correct - discard this patch.
>
> I have missed it because this should have been v2 to get my attention.

That was still the original version, you must've gotten 2 patches from
me and another person for the same change. :) And you picked up the
one not from this series, but a separate patch from Laurent Bonnans
which has above block missing. :)

>
> >
> > > + from threading import Thread
> > > + from operator import attrgetter
> > > +
> > > +--
> > > +2.17.1
> > > +
> > > diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > > index 5e6084656..fb8c4a202 100644
> > > --- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > > +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > > @@ -10,7 +10,10 @@ LICENSE_${PN}-spy = "GPLv3+"
> > >  LICENSE_${PN}-spy-dev = "GPLv3+"
> > >  LIC_FILES_CHKSUM = "file://COPYING;md5=628c01ba985ecfa21677f5ee2d5202f6"
> > >
> > > -SRC_URI = "https://pcsclite.apdu.fr/files/${BP}.tar.bz2"
> > > +SRC_URI = "\
> > > +       https://pcsclite.apdu.fr/files/${BP}.tar.bz2 \
> > > +       file://0001-pcsc-spy-use-python3-only.patch \
> > > +"
> > >  SRC_URI[md5sum] = "9d36882998449daceec267c68a21ff0d"
> > >  SRC_URI[sha256sum] = "3eb7be7d6ef618c0a444316cf5c1f2f9d7227aedba7a192f389fe3e7c0dfbbd9"
> > >
> > > @@ -50,6 +53,6 @@ RPROVIDES_${PN} += "${PN}-systemd"
> > >  RREPLACES_${PN} += "${PN}-systemd"
> > >  RCONFLICTS_${PN} += "${PN}-systemd"
> > >  SYSTEMD_SERVICE_${PN} = "pcscd.socket"
> > > -RDEPENDS_${PN}-spy +="python"
> > > +RDEPENDS_${PN}-spy +="python3"
> > >
> > >  BBCLASSEXTEND = "native"
> > > --
> > > 2.17.1
> > >
> >
> >
> > --
> > Regards,
> > Andrey.



-- 
Regards,
Andrey.


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

* Re: [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3
  2020-01-27 21:07     ` Andrey Zhizhikin
@ 2020-01-27 21:14       ` Khem Raj
  2020-01-27 22:08         ` Andrey Zhizhikin
  0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2020-01-27 21:14 UTC (permalink / raw)
  To: Andrey Zhizhikin; +Cc: openembeded-devel

On Mon, Jan 27, 2020 at 1:08 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
>
> On Mon, Jan 27, 2020 at 10:04 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Mon, Jan 27, 2020 at 12:59 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> > >
> > > Hello Raj,
> > >
> > > On Mon, Jan 27, 2020 at 6:36 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> > > >
> > > > From: Andrey Zhizhikin <andrey.z@gmail.com>
> > > >
> > > > Update pcsc-lite recipe to target python3 since python2 is EOL and has
> > > > been dropped from OE-Core.
> > > >
> > > > Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > > > ---
> > > >  .../0001-pcsc-spy-use-python3-only.patch      | 43 +++++++++++++++++++
> > > >  .../pcsc-lite/pcsc-lite_1.8.26.bb             |  7 ++-
> > > >  2 files changed, 48 insertions(+), 2 deletions(-)
> > > >  create mode 100644 meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > > >
> > > > diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > > > new file mode 100644
> > > > index 000000000..3e7b0adda
> > > > --- /dev/null
> > > > +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > > > @@ -0,0 +1,43 @@
> > > > +From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
> > > > +From: Andrey Zhizhikin <andrey.z@gmail.com>
> > > > +Date: Mon, 27 Jan 2020 13:27:12 +0000
> > > > +Subject: [PATCH] pcsc-spy: use python3 only
> > > > +
> > > > +Python2 has been EOL and most distributions would not provide any
> > > > +support for it anymore. Since Python3 is available in all distributions
> > > > +now, switch pcsc-spy to use it exclusively.
> > > > +
> > > > +Upstream-Status: Pending
> > > > +
> > > > +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > > > +---
> > > > + src/spy/pcsc-spy | 9 ++-------
> > > > + 1 file changed, 2 insertions(+), 7 deletions(-)
> > > > +
> > > > +diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
> > > > +index 85222c6..965138e 100755
> > > > +--- a/src/spy/pcsc-spy
> > > > ++++ b/src/spy/pcsc-spy
> > > > +@@ -1,4 +1,4 @@
> > > > +-#! /usr/bin/python
> > > > ++#!/usr/bin/env python3
> > > > +
> > > > + """
> > > > + #    Display PC/SC functions arguments
> > > > +@@ -22,12 +22,7 @@ from __future__ import print_function
> > > > + import os
> > > > + import signal
> > > > + import time
> > >
> > > Please take a note, that this block is different from the patch staged
> > > in the [master-next] (ad388282aa2b6e286fc9f92d37d43cc061a6a753):
> > > ==================
> > > > +-try:
> > > > +-    # for Python3
> > > > +-    from queue import Queue
> > > > +-except ImportError:
> > > > +-    # for Python2
> > > > +-    from Queue import Queue
> > > > ++from queue import Queue
> > > ==================
> > >
> > > In addition to switching the interpreter, it also removes the block
> > > which targets python2 as it does not make sense with explicit python3
> > > interpreter invoked.
> > >
> > > Not that I'm complaining that this patch was not taken :)
> > > It might just be that you haven't seen the difference between this
> > > patch and the one you picked up. Otherwise, if you feel that the
> > > version staged is more correct - discard this patch.
> >
> > I have missed it because this should have been v2 to get my attention.
>
> That was still the original version, you must've gotten 2 patches from
> me and another person for the same change. :) And you picked up the
> one not from this series, but a separate patch from Laurent Bonnans
> which has above block missing. :)

yes that's, right, I was thinking of asking to rebase this one on top
of the first one
but then I took the changes in this one and merged them along with
prior patch from Laurent


>
> >
> > >
> > > > + from threading import Thread
> > > > + from operator import attrgetter
> > > > +
> > > > +--
> > > > +2.17.1
> > > > +
> > > > diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > > > index 5e6084656..fb8c4a202 100644
> > > > --- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > > > +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > > > @@ -10,7 +10,10 @@ LICENSE_${PN}-spy = "GPLv3+"
> > > >  LICENSE_${PN}-spy-dev = "GPLv3+"
> > > >  LIC_FILES_CHKSUM = "file://COPYING;md5=628c01ba985ecfa21677f5ee2d5202f6"
> > > >
> > > > -SRC_URI = "https://pcsclite.apdu.fr/files/${BP}.tar.bz2"
> > > > +SRC_URI = "\
> > > > +       https://pcsclite.apdu.fr/files/${BP}.tar.bz2 \
> > > > +       file://0001-pcsc-spy-use-python3-only.patch \
> > > > +"
> > > >  SRC_URI[md5sum] = "9d36882998449daceec267c68a21ff0d"
> > > >  SRC_URI[sha256sum] = "3eb7be7d6ef618c0a444316cf5c1f2f9d7227aedba7a192f389fe3e7c0dfbbd9"
> > > >
> > > > @@ -50,6 +53,6 @@ RPROVIDES_${PN} += "${PN}-systemd"
> > > >  RREPLACES_${PN} += "${PN}-systemd"
> > > >  RCONFLICTS_${PN} += "${PN}-systemd"
> > > >  SYSTEMD_SERVICE_${PN} = "pcscd.socket"
> > > > -RDEPENDS_${PN}-spy +="python"
> > > > +RDEPENDS_${PN}-spy +="python3"
> > > >
> > > >  BBCLASSEXTEND = "native"
> > > > --
> > > > 2.17.1
> > > >
> > >
> > >
> > > --
> > > Regards,
> > > Andrey.
>
>
>
> --
> Regards,
> Andrey.


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

* Re: [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3
  2020-01-27 21:14       ` Khem Raj
@ 2020-01-27 22:08         ` Andrey Zhizhikin
  0 siblings, 0 replies; 12+ messages in thread
From: Andrey Zhizhikin @ 2020-01-27 22:08 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

On Mon, Jan 27, 2020 at 10:14 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Mon, Jan 27, 2020 at 1:08 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> >
> > On Mon, Jan 27, 2020 at 10:04 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > On Mon, Jan 27, 2020 at 12:59 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> > > >
> > > > Hello Raj,
> > > >
> > > > On Mon, Jan 27, 2020 at 6:36 PM Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> > > > >
> > > > > From: Andrey Zhizhikin <andrey.z@gmail.com>
> > > > >
> > > > > Update pcsc-lite recipe to target python3 since python2 is EOL and has
> > > > > been dropped from OE-Core.
> > > > >
> > > > > Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > > > > ---
> > > > >  .../0001-pcsc-spy-use-python3-only.patch      | 43 +++++++++++++++++++
> > > > >  .../pcsc-lite/pcsc-lite_1.8.26.bb             |  7 ++-
> > > > >  2 files changed, 48 insertions(+), 2 deletions(-)
> > > > >  create mode 100644 meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > > > >
> > > > > diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > > > > new file mode 100644
> > > > > index 000000000..3e7b0adda
> > > > > --- /dev/null
> > > > > +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > > > > @@ -0,0 +1,43 @@
> > > > > +From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
> > > > > +From: Andrey Zhizhikin <andrey.z@gmail.com>
> > > > > +Date: Mon, 27 Jan 2020 13:27:12 +0000
> > > > > +Subject: [PATCH] pcsc-spy: use python3 only
> > > > > +
> > > > > +Python2 has been EOL and most distributions would not provide any
> > > > > +support for it anymore. Since Python3 is available in all distributions
> > > > > +now, switch pcsc-spy to use it exclusively.
> > > > > +
> > > > > +Upstream-Status: Pending
> > > > > +
> > > > > +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > > > > +---
> > > > > + src/spy/pcsc-spy | 9 ++-------
> > > > > + 1 file changed, 2 insertions(+), 7 deletions(-)
> > > > > +
> > > > > +diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
> > > > > +index 85222c6..965138e 100755
> > > > > +--- a/src/spy/pcsc-spy
> > > > > ++++ b/src/spy/pcsc-spy
> > > > > +@@ -1,4 +1,4 @@
> > > > > +-#! /usr/bin/python
> > > > > ++#!/usr/bin/env python3
> > > > > +
> > > > > + """
> > > > > + #    Display PC/SC functions arguments
> > > > > +@@ -22,12 +22,7 @@ from __future__ import print_function
> > > > > + import os
> > > > > + import signal
> > > > > + import time
> > > >
> > > > Please take a note, that this block is different from the patch staged
> > > > in the [master-next] (ad388282aa2b6e286fc9f92d37d43cc061a6a753):
> > > > ==================
> > > > > +-try:
> > > > > +-    # for Python3
> > > > > +-    from queue import Queue
> > > > > +-except ImportError:
> > > > > +-    # for Python2
> > > > > +-    from Queue import Queue
> > > > > ++from queue import Queue
> > > > ==================
> > > >
> > > > In addition to switching the interpreter, it also removes the block
> > > > which targets python2 as it does not make sense with explicit python3
> > > > interpreter invoked.
> > > >
> > > > Not that I'm complaining that this patch was not taken :)
> > > > It might just be that you haven't seen the difference between this
> > > > patch and the one you picked up. Otherwise, if you feel that the
> > > > version staged is more correct - discard this patch.
> > >
> > > I have missed it because this should have been v2 to get my attention.
> >
> > That was still the original version, you must've gotten 2 patches from
> > me and another person for the same change. :) And you picked up the
> > one not from this series, but a separate patch from Laurent Bonnans
> > which has above block missing. :)
>
> yes that's, right, I was thinking of asking to rebase this one on top
> of the first one
> but then I took the changes in this one and merged them along with
> prior patch from Laurent

Got it, saw it now in the [master-next]. Thanks a lot!

>
>
> >
> > >
> > > >
> > > > > + from threading import Thread
> > > > > + from operator import attrgetter
> > > > > +
> > > > > +--
> > > > > +2.17.1
> > > > > +
> > > > > diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > > > > index 5e6084656..fb8c4a202 100644
> > > > > --- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > > > > +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.26.bb
> > > > > @@ -10,7 +10,10 @@ LICENSE_${PN}-spy = "GPLv3+"
> > > > >  LICENSE_${PN}-spy-dev = "GPLv3+"
> > > > >  LIC_FILES_CHKSUM = "file://COPYING;md5=628c01ba985ecfa21677f5ee2d5202f6"
> > > > >
> > > > > -SRC_URI = "https://pcsclite.apdu.fr/files/${BP}.tar.bz2"
> > > > > +SRC_URI = "\
> > > > > +       https://pcsclite.apdu.fr/files/${BP}.tar.bz2 \
> > > > > +       file://0001-pcsc-spy-use-python3-only.patch \
> > > > > +"
> > > > >  SRC_URI[md5sum] = "9d36882998449daceec267c68a21ff0d"
> > > > >  SRC_URI[sha256sum] = "3eb7be7d6ef618c0a444316cf5c1f2f9d7227aedba7a192f389fe3e7c0dfbbd9"
> > > > >
> > > > > @@ -50,6 +53,6 @@ RPROVIDES_${PN} += "${PN}-systemd"
> > > > >  RREPLACES_${PN} += "${PN}-systemd"
> > > > >  RCONFLICTS_${PN} += "${PN}-systemd"
> > > > >  SYSTEMD_SERVICE_${PN} = "pcscd.socket"
> > > > > -RDEPENDS_${PN}-spy +="python"
> > > > > +RDEPENDS_${PN}-spy +="python3"
> > > > >
> > > > >  BBCLASSEXTEND = "native"
> > > > > --
> > > > > 2.17.1
> > > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Andrey.
> >
> >
> >
> > --
> > Regards,
> > Andrey.



-- 
Regards,
Andrey.


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

* Re: [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3
  2020-01-27 20:16 ` [meta-oe][PATCH 1/3] pcsc-lite: " Andreas Oberritter
@ 2020-01-27 22:42   ` Andrey Zhizhikin
  2020-01-27 23:45     ` [RFC] Manage python symlinks with update-alternatives Andreas Oberritter
  0 siblings, 1 reply; 12+ messages in thread
From: Andrey Zhizhikin @ 2020-01-27 22:42 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: openembeded-devel

Hi Andreas,

On Mon, Jan 27, 2020 at 9:16 PM Andreas Oberritter <obi@opendreambox.org> wrote:
>
> Hi Andrey,
>
> On Mon, 27 Jan 2020 17:36:06 +0000
> Andrey Zhizhikin <andrey.z@gmail.com> wrote:
>
> > From: Andrey Zhizhikin <andrey.z@gmail.com>
> >
> > Update pcsc-lite recipe to target python3 since python2 is EOL and has
> > been dropped from OE-Core.
> >
> > Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > ---
> >  .../0001-pcsc-spy-use-python3-only.patch      | 43 +++++++++++++++++++
> >  .../pcsc-lite/pcsc-lite_1.8.26.bb             |  7 ++-
> >  2 files changed, 48 insertions(+), 2 deletions(-)
> >  create mode 100644 meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> >
> > diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > new file mode 100644
> > index 000000000..3e7b0adda
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite/0001-pcsc-spy-use-python3-only.patch
> > @@ -0,0 +1,43 @@
> > +From 75dd98876951d86890ceb30be521de57fd31e3c7 Mon Sep 17 00:00:00 2001
> > +From: Andrey Zhizhikin <andrey.z@gmail.com>
> > +Date: Mon, 27 Jan 2020 13:27:12 +0000
> > +Subject: [PATCH] pcsc-spy: use python3 only
> > +
> > +Python2 has been EOL and most distributions would not provide any
> > +support for it anymore. Since Python3 is available in all distributions
> > +now, switch pcsc-spy to use it exclusively.
> > +
> > +Upstream-Status: Pending
> > +
> > +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
> > +---
> > + src/spy/pcsc-spy | 9 ++-------
> > + 1 file changed, 2 insertions(+), 7 deletions(-)
> > +
> > +diff --git a/src/spy/pcsc-spy b/src/spy/pcsc-spy
> > +index 85222c6..965138e 100755
> > +--- a/src/spy/pcsc-spy
> > ++++ b/src/spy/pcsc-spy
> > +@@ -1,4 +1,4 @@
> > +-#! /usr/bin/python
> > ++#!/usr/bin/env python3
> > +
> > + """
> > + #    Display PC/SC functions arguments
> > +@@ -22,12 +22,7 @@ from __future__ import print_function
> > + import os
> > + import signal
> > + import time
> > +-try:
> > +-    # for Python3
> > +-    from queue import Queue
> > +-except ImportError:
> > +-    # for Python2
> > +-    from Queue import Queue
> > ++from queue import Queue
> > + from threading import Thread
> > + from operator import attrgetter
> > +
> > +--
> > +2.17.1
> > +
>
> This patch would not have been necessary if we managed the python symlink with update-alternatives. I'm doing this in my layer. Maybe that would be a better way to go? I won't be able to build master in the next days or weeks, but if you want to try and submit it, here's what I have in my bbappends:
>
> python_%.bbappend:
>
> inherit update-alternatives
>
> ALTERNATIVE_${PN}-core = "python"
> ALTERNATIVE_TARGET[python] = "${bindir}/python2"
> ALTERNATIVE_PRIORITY = "2"
>
> do_install_append_class-target() {
>     rm -f ${D}${bindir}/python
> }
>
> python3_%.bbappend:
>
> inherit update-alternatives
>
> ALTERNATIVE_${PN}-core = "python"
> ALTERNATIVE_TARGET[python] = "${bindir}/python3"
> ALTERNATIVE_PRIORITY = "3"

That is an interesting suggestion... The only potential problem with
this one I see is that when target would require to have both versions
(2 and 3) then it might be interpreted wrong. This patch states
explicitly that python3 is the interpreter of choice, with
update-alternatives I would never be sure what would land up on my
device.

Have you sent and RFC with those .bbappends of yours? This might be
something to be review.

>
> Best regards,
> Andreas

-- 
Regards,
Andrey.


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

* [RFC] Manage python symlinks with update-alternatives
  2020-01-27 22:42   ` Andrey Zhizhikin
@ 2020-01-27 23:45     ` Andreas Oberritter
  2020-01-27 23:59       ` Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Oberritter @ 2020-01-27 23:45 UTC (permalink / raw)
  To: Andrey Zhizhikin; +Cc: openembeded-devel

Hi Andrey, everybody,

This was "[meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3", where I suggested to use update-alternatives for python.

I changed the topic in the hope of gaining a wider audience. Please don't skip the quoted text:

On Mon, 27 Jan 2020 23:42:50 +0100
Andrey Zhizhikin <andrey.z@gmail.com> wrote:

> Hi Andreas,
> 
> On Mon, Jan 27, 2020 at 9:16 PM Andreas Oberritter <obi@opendreambox.org> wrote:
> >
> > Hi Andrey,
> >
> > On Mon, 27 Jan 2020 17:36:06 +0000
> > Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> > > +--- a/src/spy/pcsc-spy
> > > ++++ b/src/spy/pcsc-spy
> > > +@@ -1,4 +1,4 @@
> > > +-#! /usr/bin/python
> > > ++#!/usr/bin/env python3
> > > +
> > > + """
> > > + #    Display PC/SC functions arguments
> > > +@@ -22,12 +22,7 @@ from __future__ import print_function
> > > + import os
> > > + import signal
> > > + import time
> > > +-try:
> > > +-    # for Python3
> > > +-    from queue import Queue
> > > +-except ImportError:
> > > +-    # for Python2
> > > +-    from Queue import Queue
> > > ++from queue import Queue
> > > + from threading import Thread
> > > + from operator import attrgetter
> > > +
> > > +--
> > > +2.17.1
> > > +
> >
> > This patch would not have been necessary if we managed the python symlink with update-alternatives. I'm doing this in my layer. Maybe that would be a better way to go? I won't be able to build master in the next days or weeks, but if you want to try and submit it, here's what I have in my bbappends:
> >
> > python_%.bbappend:
> >
> > inherit update-alternatives
> >
> > ALTERNATIVE_${PN}-core = "python"
> > ALTERNATIVE_TARGET[python] = "${bindir}/python2"
> > ALTERNATIVE_PRIORITY = "2"
> >
> > do_install_append_class-target() {
> >     rm -f ${D}${bindir}/python
> > }
> >
> > python3_%.bbappend:
> >
> > inherit update-alternatives
> >
> > ALTERNATIVE_${PN}-core = "python"
> > ALTERNATIVE_TARGET[python] = "${bindir}/python3"
> > ALTERNATIVE_PRIORITY = "3"
> 
> That is an interesting suggestion... The only potential problem with
> this one I see is that when target would require to have both versions
> (2 and 3) then it might be interpreted wrong. This patch states
> explicitly that python3 is the interpreter of choice, with
> update-alternatives I would never be sure what would land up on my
> device.

In the case of your patch, this would have been no problem, because the patched
file had support for both Pythons.

From a distro owner's point of view, the priorities define which one gets
preferred.

This should be in line with PEP 394, and I think having a python symlink
always beats having none. :)

To explain the reasoning behind my approach a litte more: People want to write
Python scripts compatible with both new and old devices. Many old devices won't
ever get a Python 3 interpreter. It's possible to gain full compatibility on
a source code level, but you can never autodetect whether python2, python3 or
both are installed in $PATH with a single shebang. Also, people are already
used to not knowing whether python points to python2 or python3 (see Arch Linux).

Of course, many of you expect to have all scripts under control of OE, but what
I primarily have in mind are the device owners, who just copy over their scripts
with SSH.

Additionally, every patch that's not present in OE is a win for maintainability.

Best regards,
Andreas


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

* Re: [RFC] Manage python symlinks with update-alternatives
  2020-01-27 23:45     ` [RFC] Manage python symlinks with update-alternatives Andreas Oberritter
@ 2020-01-27 23:59       ` Khem Raj
  0 siblings, 0 replies; 12+ messages in thread
From: Khem Raj @ 2020-01-27 23:59 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: openembeded-devel

On Mon, Jan 27, 2020 at 3:45 PM Andreas Oberritter <obi@opendreambox.org> wrote:
>
> Hi Andrey, everybody,
>
> This was "[meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3", where I suggested to use update-alternatives for python.
>
> I changed the topic in the hope of gaining a wider audience. Please don't skip the quoted text:
>
> On Mon, 27 Jan 2020 23:42:50 +0100
> Andrey Zhizhikin <andrey.z@gmail.com> wrote:
>
> > Hi Andreas,
> >
> > On Mon, Jan 27, 2020 at 9:16 PM Andreas Oberritter <obi@opendreambox.org> wrote:
> > >
> > > Hi Andrey,
> > >
> > > On Mon, 27 Jan 2020 17:36:06 +0000
> > > Andrey Zhizhikin <andrey.z@gmail.com> wrote:
> > > > +--- a/src/spy/pcsc-spy
> > > > ++++ b/src/spy/pcsc-spy
> > > > +@@ -1,4 +1,4 @@
> > > > +-#! /usr/bin/python
> > > > ++#!/usr/bin/env python3
> > > > +
> > > > + """
> > > > + #    Display PC/SC functions arguments
> > > > +@@ -22,12 +22,7 @@ from __future__ import print_function
> > > > + import os
> > > > + import signal
> > > > + import time
> > > > +-try:
> > > > +-    # for Python3
> > > > +-    from queue import Queue
> > > > +-except ImportError:
> > > > +-    # for Python2
> > > > +-    from Queue import Queue
> > > > ++from queue import Queue
> > > > + from threading import Thread
> > > > + from operator import attrgetter
> > > > +
> > > > +--
> > > > +2.17.1
> > > > +
> > >
> > > This patch would not have been necessary if we managed the python symlink with update-alternatives. I'm doing this in my layer. Maybe that would be a better way to go? I won't be able to build master in the next days or weeks, but if you want to try and submit it, here's what I have in my bbappends:
> > >
> > > python_%.bbappend:
> > >
> > > inherit update-alternatives
> > >
> > > ALTERNATIVE_${PN}-core = "python"
> > > ALTERNATIVE_TARGET[python] = "${bindir}/python2"
> > > ALTERNATIVE_PRIORITY = "2"
> > >
> > > do_install_append_class-target() {
> > >     rm -f ${D}${bindir}/python
> > > }
> > >
> > > python3_%.bbappend:
> > >
> > > inherit update-alternatives
> > >
> > > ALTERNATIVE_${PN}-core = "python"
> > > ALTERNATIVE_TARGET[python] = "${bindir}/python3"
> > > ALTERNATIVE_PRIORITY = "3"
> >
> > That is an interesting suggestion... The only potential problem with
> > this one I see is that when target would require to have both versions
> > (2 and 3) then it might be interpreted wrong. This patch states
> > explicitly that python3 is the interpreter of choice, with
> > update-alternatives I would never be sure what would land up on my
> > device.
>
> In the case of your patch, this would have been no problem, because the patched
> file had support for both Pythons.
>
> From a distro owner's point of view, the priorities define which one gets
> preferred.
>
> This should be in line with PEP 394, and I think having a python symlink
> always beats having none. :)
>

I differ slightly and would like to not create python symlink
intentionally, so we can
find and fix the needed packages. python2 is on its way out and
python4 doesn't yet exist
so, packages while so far have maintained backward compatibility with py2 might
not want to carry that along and would be open to use python3 explicitly so they
might be upstreamable patches as well.

> To explain the reasoning behind my approach a litte more: People want to write
> Python scripts compatible with both new and old devices. Many old devices won't
> ever get a Python 3 interpreter. It's possible to gain full compatibility on
> a source code level, but you can never autodetect whether python2, python3 or
> both are installed in $PATH with a single shebang. Also, people are already
> used to not knowing whether python points to python2 or python3 (see Arch Linux).
>
> Of course, many of you expect to have all scripts under control of OE, but what
> I primarily have in mind are the device owners, who just copy over their scripts
> with SSH.
>
> Additionally, every patch that's not present in OE is a win for maintainability.
>
> Best regards,
> Andreas
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


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

end of thread, other threads:[~2020-01-27 23:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-27 17:36 [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3 Andrey Zhizhikin
2020-01-27 17:36 ` [meta-oe][PATCH 2/3] libteam: " Andrey Zhizhikin
2020-01-27 17:36 ` [meta-oe][PATCH 3/3] libhugetlbfs: " Andrey Zhizhikin
2020-01-27 20:16 ` [meta-oe][PATCH 1/3] pcsc-lite: " Andreas Oberritter
2020-01-27 22:42   ` Andrey Zhizhikin
2020-01-27 23:45     ` [RFC] Manage python symlinks with update-alternatives Andreas Oberritter
2020-01-27 23:59       ` Khem Raj
2020-01-27 20:59 ` [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3 Andrey Zhizhikin
2020-01-27 21:03   ` Khem Raj
2020-01-27 21:07     ` Andrey Zhizhikin
2020-01-27 21:14       ` Khem Raj
2020-01-27 22:08         ` Andrey Zhizhikin

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.