diff mbox series

[meta-python] python3-bleak: enable ptest and add missing runtime dependency

Message ID 20240405215254.1338168-1-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-python] python3-bleak: enable ptest and add missing runtime dependency | expand

Commit Message

Alper Ak April 5, 2024, 9:52 p.m. UTC
* Ptest tested on qemux86-64 and qemuarm64

* Add ptest into PTESTS_FAST_META_PYTHON

qemux86-64:

Testsuite summary
TOTAL: 14
PASS: 14
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 9
END: /usr/lib/python3-bleak/ptest
2024-04-05T18:44
STOP: ptest-runner
TOTAL: 1 FAIL: 0

qemuarm64:

Testsuite summary
TOTAL: 14
PASS: 14
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 8
END: /usr/lib/python3-bleak/ptest
2024-04-05T21:15
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python/python3-bleak/run-ptest            |  3 ++
 .../python/python3-bleak_0.21.1.bb            | 29 +++++++++++++++----
 3 files changed, 27 insertions(+), 6 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-bleak/run-ptest

Comments

Khem Raj April 5, 2024, 10:45 p.m. UTC | #1
On Fri, Apr 5, 2024 at 2:53 PM Alper Ak <alperyasinak1@gmail.com> wrote:
>
> * Ptest tested on qemux86-64 and qemuarm64
>
> * Add ptest into PTESTS_FAST_META_PYTHON
>
> qemux86-64:
>
> Testsuite summary
> TOTAL: 14
> PASS: 14
> SKIP: 0
> XFAIL: 0
> FAIL: 0
> XPASS: 0
> ERROR: 0
> DURATION: 9
> END: /usr/lib/python3-bleak/ptest
> 2024-04-05T18:44
> STOP: ptest-runner
> TOTAL: 1 FAIL: 0
>
> qemuarm64:
>
> Testsuite summary
> TOTAL: 14
> PASS: 14
> SKIP: 0
> XFAIL: 0
> FAIL: 0
> XPASS: 0
> ERROR: 0
> DURATION: 8
> END: /usr/lib/python3-bleak/ptest
> 2024-04-05T21:15
> STOP: ptest-runner
> TOTAL: 1 FAIL: 0
>
> Signed-off-by: alperak <alperyasinak1@gmail.com>
> ---
>  .../ptest-packagelists-meta-python.inc        |  1 +
>  .../python/python3-bleak/run-ptest            |  3 ++
>  .../python/python3-bleak_0.21.1.bb            | 29 +++++++++++++++----
>  3 files changed, 27 insertions(+), 6 deletions(-)
>  create mode 100644 meta-python/recipes-devtools/python/python3-bleak/run-ptest
>
> diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
> index 2f7babe48..63f312b45 100644
> --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
> +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
> @@ -12,6 +12,7 @@ PTESTS_FAST_META_PYTHON = "\
>      python3-ansicolors \
>      python3-asgiref \
>      python3-aspectlib \
> +    python3-bleak \
>      python3-blinker \
>      python3-cachetools \
>      python3-cbor2 \
> diff --git a/meta-python/recipes-devtools/python/python3-bleak/run-ptest b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
> new file mode 100644
> index 000000000..8d2017d39
> --- /dev/null
> +++ b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +pytest --automake
> diff --git a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
> index 4a1fafb5d..96f3fcbcf 100644
> --- a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
> +++ b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
> @@ -3,14 +3,31 @@ HOMEPAGE = "https://github.com/hbldh/bleak"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://LICENSE;md5=bcbc2069a86cba1b5e47253679f66ed7"
>
> -SRC_URI[sha256sum] = "ec4a1a2772fb315b992cbaa1153070c7e26968a52b0e2727035f443a1af5c18f"
> +SRCREV = "054b092e19c7a45d5ea07d8948022f54117fe5e8"
> +PYPI_SRC_URI = "git://github.com/hbldh/bleak.git;protocol=https;branch=develop"

why do we need this change if we are not bumping versions ?

>
> -PYPI_PACKAGE = "bleak"
> +inherit pypi python_poetry_core ptest
>
> -inherit pypi python_poetry_core
> +S = "${WORKDIR}/git"
> +
> +SRC_URI += " \
> +       file://run-ptest \
> +"
> +
> +RDEPENDS:${PN}-ptest += " \
> +       python3-pytest \
> +       python3-pytest-asyncio \
> +       python3-unittest-automake-output \
> +"
> +
> +do_install_ptest() {
> +       install -d ${D}${PTEST_PATH}/tests
> +       cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
> +}
>
>  RDEPENDS:${PN} += " \
> -    python3-core (>3.7) \
> -    python3-async-timeout \
> -    python3-dbus-fast \
> +       python3-core (>3.7) \
> +       python3-async-timeout \
> +       python3-dbus-fast \
> +       python3-xml \
>  "
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#109828): https://lists.openembedded.org/g/openembedded-devel/message/109828
> Mute This Topic: https://lists.openembedded.org/mt/105358066/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alper Ak April 6, 2024, 5:34 a.m. UTC | #2
Sorry, I overlooked it. The tests directory was not present in the package
downloaded with the default PYPI_SRC_URI value.

Khem Raj <raj.khem@gmail.com>, 6 Nis 2024 Cmt, 01:46 tarihinde şunu yazdı:

> On Fri, Apr 5, 2024 at 2:53 PM Alper Ak <alperyasinak1@gmail.com> wrote:
> >
> > * Ptest tested on qemux86-64 and qemuarm64
> >
> > * Add ptest into PTESTS_FAST_META_PYTHON
> >
> > qemux86-64:
> >
> > Testsuite summary
> > TOTAL: 14
> > PASS: 14
> > SKIP: 0
> > XFAIL: 0
> > FAIL: 0
> > XPASS: 0
> > ERROR: 0
> > DURATION: 9
> > END: /usr/lib/python3-bleak/ptest
> > 2024-04-05T18:44
> > STOP: ptest-runner
> > TOTAL: 1 FAIL: 0
> >
> > qemuarm64:
> >
> > Testsuite summary
> > TOTAL: 14
> > PASS: 14
> > SKIP: 0
> > XFAIL: 0
> > FAIL: 0
> > XPASS: 0
> > ERROR: 0
> > DURATION: 8
> > END: /usr/lib/python3-bleak/ptest
> > 2024-04-05T21:15
> > STOP: ptest-runner
> > TOTAL: 1 FAIL: 0
> >
> > Signed-off-by: alperak <alperyasinak1@gmail.com>
> > ---
> >  .../ptest-packagelists-meta-python.inc        |  1 +
> >  .../python/python3-bleak/run-ptest            |  3 ++
> >  .../python/python3-bleak_0.21.1.bb            | 29 +++++++++++++++----
> >  3 files changed, 27 insertions(+), 6 deletions(-)
> >  create mode 100644
> meta-python/recipes-devtools/python/python3-bleak/run-ptest
> >
> > diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc
> b/meta-python/conf/include/ptest-packagelists-meta-python.inc
> > index 2f7babe48..63f312b45 100644
> > --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
> > +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
> > @@ -12,6 +12,7 @@ PTESTS_FAST_META_PYTHON = "\
> >      python3-ansicolors \
> >      python3-asgiref \
> >      python3-aspectlib \
> > +    python3-bleak \
> >      python3-blinker \
> >      python3-cachetools \
> >      python3-cbor2 \
> > diff --git a/meta-python/recipes-devtools/python/python3-bleak/run-ptest
> b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
> > new file mode 100644
> > index 000000000..8d2017d39
> > --- /dev/null
> > +++ b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
> > @@ -0,0 +1,3 @@
> > +#!/bin/sh
> > +
> > +pytest --automake
> > diff --git a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
> b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
> > index 4a1fafb5d..96f3fcbcf 100644
> > --- a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
> > +++ b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
> > @@ -3,14 +3,31 @@ HOMEPAGE = "https://github.com/hbldh/bleak"
> >  LICENSE = "MIT"
> >  LIC_FILES_CHKSUM = "file://LICENSE;md5=bcbc2069a86cba1b5e47253679f66ed7"
> >
> > -SRC_URI[sha256sum] =
> "ec4a1a2772fb315b992cbaa1153070c7e26968a52b0e2727035f443a1af5c18f"
> > +SRCREV = "054b092e19c7a45d5ea07d8948022f54117fe5e8"
> > +PYPI_SRC_URI = "git://
> github.com/hbldh/bleak.git;protocol=https;branch=develop"
>
> why do we need this change if we are not bumping versions ?
>
> >
> > -PYPI_PACKAGE = "bleak"
> > +inherit pypi python_poetry_core ptest
> >
> > -inherit pypi python_poetry_core
> > +S = "${WORKDIR}/git"
> > +
> > +SRC_URI += " \
> > +       file://run-ptest \
> > +"
> > +
> > +RDEPENDS:${PN}-ptest += " \
> > +       python3-pytest \
> > +       python3-pytest-asyncio \
> > +       python3-unittest-automake-output \
> > +"
> > +
> > +do_install_ptest() {
> > +       install -d ${D}${PTEST_PATH}/tests
> > +       cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
> > +}
> >
> >  RDEPENDS:${PN} += " \
> > -    python3-core (>3.7) \
> > -    python3-async-timeout \
> > -    python3-dbus-fast \
> > +       python3-core (>3.7) \
> > +       python3-async-timeout \
> > +       python3-dbus-fast \
> > +       python3-xml \
> >  "
> > --
> > 2.25.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#109828):
> https://lists.openembedded.org/g/openembedded-devel/message/109828
> > Mute This Topic: https://lists.openembedded.org/mt/105358066/1997914
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
Tim Orling April 6, 2024, 2:13 p.m. UTC | #3
On Fri, Apr 5, 2024 at 10:34 PM Alper Ak <alperyasinak1@gmail.com> wrote:

> Sorry, I overlooked it. The tests directory was not present in the package
> downloaded with the default PYPI_SRC_URI value.
>

Unfortunately, many pypi.org tarballs exclude tests. So switching to git
fetcher will make sense in those cases.
Given the “xz backdoor” incident, we might decide to prefer git.

>
> Khem Raj <raj.khem@gmail.com>, 6 Nis 2024 Cmt, 01:46 tarihinde şunu yazdı:
>
>> On Fri, Apr 5, 2024 at 2:53 PM Alper Ak <alperyasinak1@gmail.com> wrote:
>> >
>> > * Ptest tested on qemux86-64 and qemuarm64
>> >
>> > * Add ptest into PTESTS_FAST_META_PYTHON
>> >
>> > qemux86-64:
>> >
>> > Testsuite summary
>> > TOTAL: 14
>> > PASS: 14
>> > SKIP: 0
>> > XFAIL: 0
>> > FAIL: 0
>> > XPASS: 0
>> > ERROR: 0
>> > DURATION: 9
>> > END: /usr/lib/python3-bleak/ptest
>> > 2024-04-05T18:44
>> > STOP: ptest-runner
>> > TOTAL: 1 FAIL: 0
>> >
>> > qemuarm64:
>> >
>> > Testsuite summary
>> > TOTAL: 14
>> > PASS: 14
>> > SKIP: 0
>> > XFAIL: 0
>> > FAIL: 0
>> > XPASS: 0
>> > ERROR: 0
>> > DURATION: 8
>> > END: /usr/lib/python3-bleak/ptest
>> > 2024-04-05T21:15
>> > STOP: ptest-runner
>> > TOTAL: 1 FAIL: 0
>> >
>> > Signed-off-by: alperak <alperyasinak1@gmail.com>
>> > ---
>> >  .../ptest-packagelists-meta-python.inc        |  1 +
>> >  .../python/python3-bleak/run-ptest            |  3 ++
>> >  .../python/python3-bleak_0.21.1.bb            | 29 +++++++++++++++----
>> >  3 files changed, 27 insertions(+), 6 deletions(-)
>> >  create mode 100644
>> meta-python/recipes-devtools/python/python3-bleak/run-ptest
>> >
>> > diff --git
>> a/meta-python/conf/include/ptest-packagelists-meta-python.inc
>> b/meta-python/conf/include/ptest-packagelists-meta-python.inc
>> > index 2f7babe48..63f312b45 100644
>> > --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
>> > +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
>> > @@ -12,6 +12,7 @@ PTESTS_FAST_META_PYTHON = "\
>> >      python3-ansicolors \
>> >      python3-asgiref \
>> >      python3-aspectlib \
>> > +    python3-bleak \
>> >      python3-blinker \
>> >      python3-cachetools \
>> >      python3-cbor2 \
>> > diff --git
>> a/meta-python/recipes-devtools/python/python3-bleak/run-ptest
>> b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
>> > new file mode 100644
>> > index 000000000..8d2017d39
>> > --- /dev/null
>> > +++ b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
>> > @@ -0,0 +1,3 @@
>> > +#!/bin/sh
>> > +
>> > +pytest --automake
>> > diff --git a/meta-python/recipes-devtools/python/
>> python3-bleak_0.21.1.bb b/meta-python/recipes-devtools/python/
>> python3-bleak_0.21.1.bb
>> > index 4a1fafb5d..96f3fcbcf 100644
>> > --- a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
>> > +++ b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
>> > @@ -3,14 +3,31 @@ HOMEPAGE = "https://github.com/hbldh/bleak"
>> >  LICENSE = "MIT"
>> >  LIC_FILES_CHKSUM =
>> "file://LICENSE;md5=bcbc2069a86cba1b5e47253679f66ed7"
>> >
>> > -SRC_URI[sha256sum] =
>> "ec4a1a2772fb315b992cbaa1153070c7e26968a52b0e2727035f443a1af5c18f"
>> > +SRCREV = "054b092e19c7a45d5ea07d8948022f54117fe5e8"
>> > +PYPI_SRC_URI = "git://
>> github.com/hbldh/bleak.git;protocol=https;branch=develop"
>>
>> why do we need this change if we are not bumping versions ?
>>
>> >
>> > -PYPI_PACKAGE = "bleak"
>> > +inherit pypi python_poetry_core ptest
>> >
>> > -inherit pypi python_poetry_core
>> > +S = "${WORKDIR}/git"
>> > +
>> > +SRC_URI += " \
>> > +       file://run-ptest \
>> > +"
>> > +
>> > +RDEPENDS:${PN}-ptest += " \
>> > +       python3-pytest \
>> > +       python3-pytest-asyncio \
>> > +       python3-unittest-automake-output \
>> > +"
>> > +
>> > +do_install_ptest() {
>> > +       install -d ${D}${PTEST_PATH}/tests
>> > +       cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
>> > +}
>> >
>> >  RDEPENDS:${PN} += " \
>> > -    python3-core (>3.7) \
>> > -    python3-async-timeout \
>> > -    python3-dbus-fast \
>> > +       python3-core (>3.7) \
>> > +       python3-async-timeout \
>> > +       python3-dbus-fast \
>> > +       python3-xml \
>> >  "
>> > --
>> > 2.25.1
>> >
>> >
>> >
>> >
>>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#109831):
> https://lists.openembedded.org/g/openembedded-devel/message/109831
> Mute This Topic: https://lists.openembedded.org/mt/105358066/924729
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Khem Raj April 6, 2024, 5:47 p.m. UTC | #4
On Sat, Apr 6, 2024 at 7:13 AM Tim Orling <ticotimo@gmail.com> wrote:
>
>
>
> On Fri, Apr 5, 2024 at 10:34 PM Alper Ak <alperyasinak1@gmail.com> wrote:
>>
>> Sorry, I overlooked it. The tests directory was not present in the package downloaded with the default PYPI_SRC_URI value.
>
>
> Unfortunately, many pypi.org tarballs exclude tests. So switching to git fetcher will make sense in those cases.

Hmm ok. So is this SRCREV corresponding to same release ? if so we are
ok, otherwise perhaps adding +git to SRCREV would
be appropriate

> Given the “xz backdoor” incident, we might decide to prefer git.

Nah, that would not mitigate it

>>
>>
>> Khem Raj <raj.khem@gmail.com>, 6 Nis 2024 Cmt, 01:46 tarihinde şunu yazdı:
>>>
>>> On Fri, Apr 5, 2024 at 2:53 PM Alper Ak <alperyasinak1@gmail.com> wrote:
>>> >
>>> > * Ptest tested on qemux86-64 and qemuarm64
>>> >
>>> > * Add ptest into PTESTS_FAST_META_PYTHON
>>> >
>>> > qemux86-64:
>>> >
>>> > Testsuite summary
>>> > TOTAL: 14
>>> > PASS: 14
>>> > SKIP: 0
>>> > XFAIL: 0
>>> > FAIL: 0
>>> > XPASS: 0
>>> > ERROR: 0
>>> > DURATION: 9
>>> > END: /usr/lib/python3-bleak/ptest
>>> > 2024-04-05T18:44
>>> > STOP: ptest-runner
>>> > TOTAL: 1 FAIL: 0
>>> >
>>> > qemuarm64:
>>> >
>>> > Testsuite summary
>>> > TOTAL: 14
>>> > PASS: 14
>>> > SKIP: 0
>>> > XFAIL: 0
>>> > FAIL: 0
>>> > XPASS: 0
>>> > ERROR: 0
>>> > DURATION: 8
>>> > END: /usr/lib/python3-bleak/ptest
>>> > 2024-04-05T21:15
>>> > STOP: ptest-runner
>>> > TOTAL: 1 FAIL: 0
>>> >
>>> > Signed-off-by: alperak <alperyasinak1@gmail.com>
>>> > ---
>>> >  .../ptest-packagelists-meta-python.inc        |  1 +
>>> >  .../python/python3-bleak/run-ptest            |  3 ++
>>> >  .../python/python3-bleak_0.21.1.bb            | 29 +++++++++++++++----
>>> >  3 files changed, 27 insertions(+), 6 deletions(-)
>>> >  create mode 100644 meta-python/recipes-devtools/python/python3-bleak/run-ptest
>>> >
>>> > diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
>>> > index 2f7babe48..63f312b45 100644
>>> > --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
>>> > +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
>>> > @@ -12,6 +12,7 @@ PTESTS_FAST_META_PYTHON = "\
>>> >      python3-ansicolors \
>>> >      python3-asgiref \
>>> >      python3-aspectlib \
>>> > +    python3-bleak \
>>> >      python3-blinker \
>>> >      python3-cachetools \
>>> >      python3-cbor2 \
>>> > diff --git a/meta-python/recipes-devtools/python/python3-bleak/run-ptest b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
>>> > new file mode 100644
>>> > index 000000000..8d2017d39
>>> > --- /dev/null
>>> > +++ b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
>>> > @@ -0,0 +1,3 @@
>>> > +#!/bin/sh
>>> > +
>>> > +pytest --automake
>>> > diff --git a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
>>> > index 4a1fafb5d..96f3fcbcf 100644
>>> > --- a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
>>> > +++ b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
>>> > @@ -3,14 +3,31 @@ HOMEPAGE = "https://github.com/hbldh/bleak"
>>> >  LICENSE = "MIT"
>>> >  LIC_FILES_CHKSUM = "file://LICENSE;md5=bcbc2069a86cba1b5e47253679f66ed7"
>>> >
>>> > -SRC_URI[sha256sum] = "ec4a1a2772fb315b992cbaa1153070c7e26968a52b0e2727035f443a1af5c18f"
>>> > +SRCREV = "054b092e19c7a45d5ea07d8948022f54117fe5e8"
>>> > +PYPI_SRC_URI = "git://github.com/hbldh/bleak.git;protocol=https;branch=develop"
>>>
>>> why do we need this change if we are not bumping versions ?
>>>
>>> >
>>> > -PYPI_PACKAGE = "bleak"
>>> > +inherit pypi python_poetry_core ptest
>>> >
>>> > -inherit pypi python_poetry_core
>>> > +S = "${WORKDIR}/git"
>>> > +
>>> > +SRC_URI += " \
>>> > +       file://run-ptest \
>>> > +"
>>> > +
>>> > +RDEPENDS:${PN}-ptest += " \
>>> > +       python3-pytest \
>>> > +       python3-pytest-asyncio \
>>> > +       python3-unittest-automake-output \
>>> > +"
>>> > +
>>> > +do_install_ptest() {
>>> > +       install -d ${D}${PTEST_PATH}/tests
>>> > +       cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
>>> > +}
>>> >
>>> >  RDEPENDS:${PN} += " \
>>> > -    python3-core (>3.7) \
>>> > -    python3-async-timeout \
>>> > -    python3-dbus-fast \
>>> > +       python3-core (>3.7) \
>>> > +       python3-async-timeout \
>>> > +       python3-dbus-fast \
>>> > +       python3-xml \
>>> >  "
>>> > --
>>> > 2.25.1
>>> >
>>> >
>>> >
>>> >
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#109831): https://lists.openembedded.org/g/openembedded-devel/message/109831
>> Mute This Topic: https://lists.openembedded.org/mt/105358066/924729
>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ticotimo@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Alper Ak April 6, 2024, 6:06 p.m. UTC | #5
> Hmm ok. So is this SRCREV corresponding to same release ? if so we are
> ok, otherwise perhaps adding +git to SRCREV would
> be appropriate

Yes, it's the same release.


Khem Raj <raj.khem@gmail.com>, 6 Nis 2024 Cmt, 20:48 tarihinde şunu yazdı:

> On Sat, Apr 6, 2024 at 7:13 AM Tim Orling <ticotimo@gmail.com> wrote:
> >
> >
> >
> > On Fri, Apr 5, 2024 at 10:34 PM Alper Ak <alperyasinak1@gmail.com>
> wrote:
> >>
> >> Sorry, I overlooked it. The tests directory was not present in the
> package downloaded with the default PYPI_SRC_URI value.
> >
> >
> > Unfortunately, many pypi.org tarballs exclude tests. So switching to
> git fetcher will make sense in those cases.
>
> Hmm ok. So is this SRCREV corresponding to same release ? if so we are
> ok, otherwise perhaps adding +git to SRCREV would
> be appropriate
>
> > Given the “xz backdoor” incident, we might decide to prefer git.
>
> Nah, that would not mitigate it
>
> >>
> >>
> >> Khem Raj <raj.khem@gmail.com>, 6 Nis 2024 Cmt, 01:46 tarihinde şunu
> yazdı:
> >>>
> >>> On Fri, Apr 5, 2024 at 2:53 PM Alper Ak <alperyasinak1@gmail.com>
> wrote:
> >>> >
> >>> > * Ptest tested on qemux86-64 and qemuarm64
> >>> >
> >>> > * Add ptest into PTESTS_FAST_META_PYTHON
> >>> >
> >>> > qemux86-64:
> >>> >
> >>> > Testsuite summary
> >>> > TOTAL: 14
> >>> > PASS: 14
> >>> > SKIP: 0
> >>> > XFAIL: 0
> >>> > FAIL: 0
> >>> > XPASS: 0
> >>> > ERROR: 0
> >>> > DURATION: 9
> >>> > END: /usr/lib/python3-bleak/ptest
> >>> > 2024-04-05T18:44
> >>> > STOP: ptest-runner
> >>> > TOTAL: 1 FAIL: 0
> >>> >
> >>> > qemuarm64:
> >>> >
> >>> > Testsuite summary
> >>> > TOTAL: 14
> >>> > PASS: 14
> >>> > SKIP: 0
> >>> > XFAIL: 0
> >>> > FAIL: 0
> >>> > XPASS: 0
> >>> > ERROR: 0
> >>> > DURATION: 8
> >>> > END: /usr/lib/python3-bleak/ptest
> >>> > 2024-04-05T21:15
> >>> > STOP: ptest-runner
> >>> > TOTAL: 1 FAIL: 0
> >>> >
> >>> > Signed-off-by: alperak <alperyasinak1@gmail.com>
> >>> > ---
> >>> >  .../ptest-packagelists-meta-python.inc        |  1 +
> >>> >  .../python/python3-bleak/run-ptest            |  3 ++
> >>> >  .../python/python3-bleak_0.21.1.bb            | 29
> +++++++++++++++----
> >>> >  3 files changed, 27 insertions(+), 6 deletions(-)
> >>> >  create mode 100644
> meta-python/recipes-devtools/python/python3-bleak/run-ptest
> >>> >
> >>> > diff --git
> a/meta-python/conf/include/ptest-packagelists-meta-python.inc
> b/meta-python/conf/include/ptest-packagelists-meta-python.inc
> >>> > index 2f7babe48..63f312b45 100644
> >>> > --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
> >>> > +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
> >>> > @@ -12,6 +12,7 @@ PTESTS_FAST_META_PYTHON = "\
> >>> >      python3-ansicolors \
> >>> >      python3-asgiref \
> >>> >      python3-aspectlib \
> >>> > +    python3-bleak \
> >>> >      python3-blinker \
> >>> >      python3-cachetools \
> >>> >      python3-cbor2 \
> >>> > diff --git
> a/meta-python/recipes-devtools/python/python3-bleak/run-ptest
> b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
> >>> > new file mode 100644
> >>> > index 000000000..8d2017d39
> >>> > --- /dev/null
> >>> > +++ b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
> >>> > @@ -0,0 +1,3 @@
> >>> > +#!/bin/sh
> >>> > +
> >>> > +pytest --automake
> >>> > diff --git a/meta-python/recipes-devtools/python/
> python3-bleak_0.21.1.bb b/meta-python/recipes-devtools/python/
> python3-bleak_0.21.1.bb
> >>> > index 4a1fafb5d..96f3fcbcf 100644
> >>> > --- a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
> >>> > +++ b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
> >>> > @@ -3,14 +3,31 @@ HOMEPAGE = "https://github.com/hbldh/bleak"
> >>> >  LICENSE = "MIT"
> >>> >  LIC_FILES_CHKSUM =
> "file://LICENSE;md5=bcbc2069a86cba1b5e47253679f66ed7"
> >>> >
> >>> > -SRC_URI[sha256sum] =
> "ec4a1a2772fb315b992cbaa1153070c7e26968a52b0e2727035f443a1af5c18f"
> >>> > +SRCREV = "054b092e19c7a45d5ea07d8948022f54117fe5e8"
> >>> > +PYPI_SRC_URI = "git://
> github.com/hbldh/bleak.git;protocol=https;branch=develop"
> >>>
> >>> why do we need this change if we are not bumping versions ?
> >>>
> >>> >
> >>> > -PYPI_PACKAGE = "bleak"
> >>> > +inherit pypi python_poetry_core ptest
> >>> >
> >>> > -inherit pypi python_poetry_core
> >>> > +S = "${WORKDIR}/git"
> >>> > +
> >>> > +SRC_URI += " \
> >>> > +       file://run-ptest \
> >>> > +"
> >>> > +
> >>> > +RDEPENDS:${PN}-ptest += " \
> >>> > +       python3-pytest \
> >>> > +       python3-pytest-asyncio \
> >>> > +       python3-unittest-automake-output \
> >>> > +"
> >>> > +
> >>> > +do_install_ptest() {
> >>> > +       install -d ${D}${PTEST_PATH}/tests
> >>> > +       cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
> >>> > +}
> >>> >
> >>> >  RDEPENDS:${PN} += " \
> >>> > -    python3-core (>3.7) \
> >>> > -    python3-async-timeout \
> >>> > -    python3-dbus-fast \
> >>> > +       python3-core (>3.7) \
> >>> > +       python3-async-timeout \
> >>> > +       python3-dbus-fast \
> >>> > +       python3-xml \
> >>> >  "
> >>> > --
> >>> > 2.25.1
> >>> >
> >>> >
> >>> >
> >>> >
> >>
> >>
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >> Links: You receive all messages sent to this group.
> >> View/Reply Online (#109831):
> https://lists.openembedded.org/g/openembedded-devel/message/109831
> >> Mute This Topic: https://lists.openembedded.org/mt/105358066/924729
> >> Group Owner: openembedded-devel+owner@lists.openembedded.org
> >> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
> [ticotimo@gmail.com]
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >>
>
Khem Raj April 7, 2024, 3:42 p.m. UTC | #6
On Sat, 06 Apr 2024 00:52:54 +0300, alperak wrote:
> * Ptest tested on qemux86-64 and qemuarm64
> 
> * Add ptest into PTESTS_FAST_META_PYTHON
> 
> qemux86-64:
> 
> Testsuite summary
> TOTAL: 14
> PASS: 14
> SKIP: 0
> XFAIL: 0
> FAIL: 0
> XPASS: 0
> ERROR: 0
> DURATION: 9
> END: /usr/lib/python3-bleak/ptest
> 2024-04-05T18:44
> STOP: ptest-runner
> TOTAL: 1 FAIL: 0
> 
> [...]

Applied, thanks!

[1/1] python3-bleak: enable ptest and add missing runtime dependency
      commit: dce392b58826d1aff643196f05e592c9f40e9636

Best regards,
diff mbox series

Patch

diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 2f7babe48..63f312b45 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -12,6 +12,7 @@  PTESTS_FAST_META_PYTHON = "\
     python3-ansicolors \
     python3-asgiref \
     python3-aspectlib \
+    python3-bleak \
     python3-blinker \
     python3-cachetools \
     python3-cbor2 \
diff --git a/meta-python/recipes-devtools/python/python3-bleak/run-ptest b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
new file mode 100644
index 000000000..8d2017d39
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-bleak/run-ptest
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
index 4a1fafb5d..96f3fcbcf 100644
--- a/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
+++ b/meta-python/recipes-devtools/python/python3-bleak_0.21.1.bb
@@ -3,14 +3,31 @@  HOMEPAGE = "https://github.com/hbldh/bleak"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=bcbc2069a86cba1b5e47253679f66ed7"
 
-SRC_URI[sha256sum] = "ec4a1a2772fb315b992cbaa1153070c7e26968a52b0e2727035f443a1af5c18f"
+SRCREV = "054b092e19c7a45d5ea07d8948022f54117fe5e8"
+PYPI_SRC_URI = "git://github.com/hbldh/bleak.git;protocol=https;branch=develop"
 
-PYPI_PACKAGE = "bleak"
+inherit pypi python_poetry_core ptest
 
-inherit pypi python_poetry_core
+S = "${WORKDIR}/git"
+
+SRC_URI += " \
+	file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+	python3-pytest \
+	python3-pytest-asyncio \
+	python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
 
 RDEPENDS:${PN} += " \
-    python3-core (>3.7) \
-    python3-async-timeout \
-    python3-dbus-fast \
+	python3-core (>3.7) \
+	python3-async-timeout \
+	python3-dbus-fast \
+	python3-xml \
 "