[oe] [meta-oe][PATCH 1/3] pcsc-lite: update recipe to use python3

Andrey Zhizhikin andrey.z at gmail.com
Mon Jan 27 22:08:56 UTC 2020


On Mon, Jan 27, 2020 at 10:14 PM Khem Raj <raj.khem at gmail.com> wrote:
>
> On Mon, Jan 27, 2020 at 1:08 PM Andrey Zhizhikin <andrey.z at gmail.com> wrote:
> >
> > On Mon, Jan 27, 2020 at 10:04 PM Khem Raj <raj.khem at gmail.com> wrote:
> > >
> > > On Mon, Jan 27, 2020 at 12:59 PM Andrey Zhizhikin <andrey.z at gmail.com> wrote:
> > > >
> > > > Hello Raj,
> > > >
> > > > On Mon, Jan 27, 2020 at 6:36 PM Andrey Zhizhikin <andrey.z at gmail.com> wrote:
> > > > >
> > > > > From: Andrey Zhizhikin <andrey.z at 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 at 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 at 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 at 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.


More information about the Openembedded-devel mailing list