python3-pyyaml-include: add initial recipe for version 1.3.2
PATCH 1/3 python3-pyyaml-include: add initial recipe for version 1.3.2
From: Derek Straka <[email protected]>
Add a recipe for the pyyaml-include package that extends PyYAML to include YAML files within YAML files. Add a ptest to run the unit tests and include the tests as part of the package lists in meta-python
--- .../python/python3-pyyaml-include/run-ptest | 3 ++ .../python/python3-pyyaml-include_1.3.2.bb | 28 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 meta-python/recipes-devtools/python/python3-pyyaml-include/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb
meta-python/recipes-devtools/python/python3-pyyaml-include/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb new file +28 -0
@@ -0,0 +1,28 @@ +SUMMARY = "Extending PyYAML with a custom constructor for including YAML files within YAML files" +HOMEPAGE = "https://github.com/tanbro/pyyaml-include" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" +DEPENDS += "${PYTHON_PN}-setuptools-scm-native" +SRCREV = "36b6975aa8fc7a6cbf37de40aa2ed6d996b2f7be" + +SRC_URI = " \ + git://github.com/tanbro/pyyaml-include;protocol=https;branch=main \ + file://run-ptest \ + " + +S = "${WORKDIR}/git" + +inherit python_setuptools_build_meta ptest + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-pyyaml \ +" +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" +
Signature · 1 line
2.25.1
PATCH 2/3 python3-pyyaml-include: switch to pytest --automake
From: Tim Orling <[email protected]>
* Also replace ${PYTHON_PN} with python3
--- .../python/python3-pyyaml-include/run-ptest | 2 +- .../python/python3-pyyaml-include_1.3.2.bb | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-)
meta-python/recipes-devtools/python/python3-pyyaml-include/run-ptest +1 -1
@@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +4 -3
@@ -2,7 +2,7 @@ SUMMARY = "Extending PyYAML with a custom constructor for including YAML files w HOMEPAGE = "https://github.com/tanbro/pyyaml-include" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS += "${PYTHON_PN}-setuptools-scm-native" +DEPENDS += "python3-setuptools-scm-native" SRCREV = "36b6975aa8fc7a6cbf37de40aa2ed6d996b2f7be" SRC_URI = " \
@@ -20,9 +20,10 @@ do_install_ptest() { } RDEPENDS:${PN} += " \ - ${PYTHON_PN}-pyyaml \ + python3-pyyaml \ " RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ + python3-pytest \ + python3-unittest-automake-output \ "
Signature · 1 line
2.25.1
Re: [oe] [meta-python][kirkstone][PATCH 2/3] python3-pyyaml-include: switch to pytest --automake
Quoted 9 lines · Mingli
From: Tim Orling <[email protected]>
* Also replace ${PYTHON_PN} with python3
Signed-off-by Tim Orling <[email protected]>Signed-off-by Khem Raj <[email protected]>(cherry picked from commit 182f31a182f6572a3538b875cec7ee761e2da1e6)Signed-off-by Mingli Yu <[email protected]>
...
Quoted 15 lines
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +1
-1@@ -2,7 +2,7 @@ SUMMARY = "Extending PyYAML with a custom constructor for including YAML files w HOMEPAGE = "https://github.com/tanbro/pyyaml-include" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS += "${PYTHON_PN}-setuptools-scm-native" +DEPENDS += "python3-setuptools-scm-native" SRCREV = "36b6975aa8fc7a6cbf37de40aa2ed6d996b2f7be" SRC_URI = " \@@ -20,9 +20,10 @@ do_install_ptest() { }
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb do_install_ptest() { · line 28
Quoted 10 lines
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +3
-2RDEPENDS:${PN} += " \ - ${PYTHON_PN}-pyyaml \ + python3-pyyaml \ " RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ + python3-pytest \ + python3-unittest-automake-output \ "
This was now merged to meta-oe kirkstone, but the python3-unittest-automake-output isn't available in oe-core kirkstone, causing:
ERROR: Nothing RPROVIDES 'python3-unittest-automake-output' (but meta-oe/meta-python/recipes-devtools/python/python3-pyyaml-include_1.4.1.bb RDEPENDS on or otherwise requires it)
python3-unittest-automake-output was added to oe-core in mickledore:
openembedded-core $ git log --oneline -- ./meta/recipes-devtools/python/python3-unittest-automake-output_0.1.bb db0e82135c python3-unittest-automake-output: upgrade to 0.2 961e4f3fc7 python3-unittest-automake-output: add new recipe for ptest integration
Please revert this (if the newer python3-pyyaml-include works without this change) or add python3-unittest-automake-output to kirkstone as well.
Cheers,
Re: [oe] [meta-python][kirkstone][PATCH 2/3] python3-pyyaml-include: switch to pytest --automake
Quoted 55 lines · Martin Jansa
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 9 lines · Mingli
From: Tim Orling <[email protected]>
* Also replace ${PYTHON_PN} with python3
Signed-off-by Tim Orling <[email protected]>Signed-off-by Khem Raj <[email protected]>(cherry picked from commit 182f31a182f6572a3538b875cec7ee761e2da1e6)Signed-off-by Mingli Yu <[email protected]>...
Quoted 15 lines
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +1
-1@@ -2,7 +2,7 @@ SUMMARY = "Extending PyYAML with a custom constructor for including YAML files w HOMEPAGE = "https://github.com/tanbro/pyyaml-include" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS += "${PYTHON_PN}-setuptools-scm-native" +DEPENDS += "python3-setuptools-scm-native" SRCREV = "36b6975aa8fc7a6cbf37de40aa2ed6d996b2f7be" SRC_URI = " \@@ -20,9 +20,10 @@ do_install_ptest() { }meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb do_install_ptest() { · line 28
Quoted 10 lines
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +3
-2RDEPENDS:${PN} += " \ - ${PYTHON_PN}-pyyaml \ + python3-pyyaml \ " RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ + python3-pytest \ + python3-unittest-automake-output \ "This was now merged to meta-oe kirkstone, but the python3-unittest-automake-output isn't available in oe-core kirkstone, causing:
ERROR: Nothing RPROVIDES 'python3-unittest-automake-output' (but meta-oe/meta-python/recipes-devtools/python/python3-pyyaml-include_1.4.1.bb RDEPENDS on or otherwise requires it)python3-unittest-automake-output was added to oe-core in mickledore:
openembedded-core $ git log --oneline -- ./meta/recipes-devtools/python/python3-unittest-automake-output_0.1.bb
db0e82135cpython3-unittest-automake-output: upgrade to 0.2961e4f3fc7python3-unittest-automake-output: add new recipe for ptest integration
Quoted 3 lines
Please revert this (if the newer python3-pyyaml-include works without this change) or add python3-unittest-automake-output to kirkstone as well.
The python3-pyyaml-include did works without python3-unittest-automake-output, but the python3-pyyaml-include ptest needs python3-unittest-automake-output and I also sent the patch to oe-core(kirkstone)[1].
[1] https://lore.kernel.org/all/[email protected]/T/#mda91919809cf156aba24f099bef65142067cd318
Thanks,
Quoted 2 lines
Cheers,
Re: [oe] [meta-python][kirkstone][PATCH 2/3] python3-pyyaml-include: switch to pytest --automake
Quoted 63 lines · Mingli
Quoted 55 lines · Martin Jansa
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 9 lines · Mingli
From: Tim Orling <[email protected]>
* Also replace ${PYTHON_PN} with python3
Signed-off-by Tim Orling <[email protected]>Signed-off-by Khem Raj <[email protected]>(cherry picked from commit 182f31a182f6572a3538b875cec7ee761e2da1e6)Signed-off-by Mingli Yu <[email protected]>...
Quoted 15 lines
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +1
-1@@ -2,7 +2,7 @@ SUMMARY = "Extending PyYAML with a custom constructor for including YAML files w HOMEPAGE = "https://github.com/tanbro/pyyaml-include" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS += "${PYTHON_PN}-setuptools-scm-native" +DEPENDS += "python3-setuptools-scm-native" SRCREV = "36b6975aa8fc7a6cbf37de40aa2ed6d996b2f7be" SRC_URI = " \@@ -20,9 +20,10 @@ do_install_ptest() { }meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb do_install_ptest() { · line 28
Quoted 10 lines
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +3
-2RDEPENDS:${PN} += " \ - ${PYTHON_PN}-pyyaml \ + python3-pyyaml \ " RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ + python3-pytest \ + python3-unittest-automake-output \ "This was now merged to meta-oe kirkstone, but the python3-unittest-automake-output isn't available in oe-core kirkstone, causing:
ERROR: Nothing RPROVIDES 'python3-unittest-automake-output' (but meta-oe/meta-python/recipes-devtools/python/python3-pyyaml-include_1.4.1.bb RDEPENDS on or otherwise requires it)python3-unittest-automake-output was added to oe-core in mickledore:
openembedded-core $ git log --oneline -- ./meta/recipes-devtools/python/python3-unittest-automake-output_0.1.bb
db0e82135cpython3-unittest-automake-output: upgrade to 0.2961e4f3fc7python3-unittest-automake-output: add new recipe for ptest integrationQuoted 3 lines
Please revert this (if the newer python3-pyyaml-include works without this change) or add python3-unittest-automake-output to kirkstone as well.
Quoted 7 lines
The python3-pyyaml-include did works without python3-unittest-automake-output, but the python3-pyyaml-include ptest needs python3-unittest-automake-output and I also sent the patch to oe-core(kirkstone)[1].
[1]
https://lore.kernel.org/all/[email protected]/T/#mda91919809cf156aba24f099bef65142067cd318
[1] was rejected by Steve, so what's the plan now?
Re: [oe] [meta-python][kirkstone][PATCH 2/3] python3-pyyaml-include: switch to pytest --automake
Quoted 72 lines · Martin Jansa
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 68 lines · Mingli
Quoted 55 lines · Martin Jansa
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 9 lines · Mingli
From: Tim Orling <[email protected]>
* Also replace ${PYTHON_PN} with python3
Signed-off-by Tim Orling <[email protected]>Signed-off-by Khem Raj <[email protected]>(cherry picked from commit 182f31a182f6572a3538b875cec7ee761e2da1e6)Signed-off-by Mingli Yu <[email protected]>...
Quoted 15 lines
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +1
-1@@ -2,7 +2,7 @@ SUMMARY = "Extending PyYAML with a custom constructor for including YAML files w HOMEPAGE = "https://github.com/tanbro/pyyaml-include" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS += "${PYTHON_PN}-setuptools-scm-native" +DEPENDS += "python3-setuptools-scm-native" SRCREV = "36b6975aa8fc7a6cbf37de40aa2ed6d996b2f7be" SRC_URI = " \@@ -20,9 +20,10 @@ do_install_ptest() { }meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb do_install_ptest() { · line 28
Quoted 10 lines
meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +3
-2RDEPENDS:${PN} += " \ - ${PYTHON_PN}-pyyaml \ + python3-pyyaml \ " RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ + python3-pytest \ + python3-unittest-automake-output \ "This was now merged to meta-oe kirkstone, but the python3-unittest-automake-output isn't available in oe-core kirkstone, causing:
ERROR: Nothing RPROVIDES 'python3-unittest-automake-output' (but meta-oe/meta-python/recipes-devtools/python/python3-pyyaml-include_1.4.1.bb RDEPENDS on or otherwise requires it)python3-unittest-automake-output was added to oe-core in mickledore:
openembedded-core $ git log --oneline -- ./meta/recipes-devtools/python/python3-unittest-automake-output_0.1.bb
db0e82135cpython3-unittest-automake-output: upgrade to 0.2961e4f3fc7python3-unittest-automake-output: add new recipe for ptest integrationQuoted 3 lines
Please revert this (if the newer python3-pyyaml-include works without this change) or add python3-unittest-automake-output to kirkstone as well.
The python3-pyyaml-include did works without python3-unittest-automake-output, but the python3-pyyaml-include ptest needs python3-unittest-automake-output and I also sent the patch to oe-core(kirkstone)[1].
Quoted 4 lines
Quoted 2 lines
[1]
https://lore.kernel.org/all/[email protected]/T/#mda91919809cf156aba24f099bef65142067cd318[1] was rejected by Steve, so what's the plan now?
Is it okay to add python3-unittest-automake-output in meta-openembedded/meta-python(kirkstone)? If okay, I will send the patch then.
Thanks,
Quoted 11 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110193): https://lists.openembedded.org/g/openembedded-devel/message/110193
Mute This Topic: https://lists.openembedded.org/mt/105173183/3618448
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 1/1 python3-pyyaml-include: Drop pytest --automake
In reply to Martin JansaFrom: Mingli Yu <[email protected]>
The python3-unittest-automake-output is not supported [1], so drop "pytest --automake".
[1] https://lore.kernel.org/all/[email protected]/T/#mda91919809cf156aba24f099bef65142067cd318
--- .../recipes-devtools/python/python3-pyyaml-include/run-ptest | 2 +- .../recipes-devtools/python/python3-pyyaml-include_1.4.1.bb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
meta-python/recipes-devtools/python/python3-pyyaml-include/run-ptest +1 -1
@@ -1,3 +1,3 @@ #!/bin/sh -pytest --automake +pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
meta-python/recipes-devtools/python/python3-pyyaml-include_1.4.1.bb +0 -1
@@ -24,6 +24,5 @@ RDEPENDS:${PN} += " \ " RDEPENDS:${PN}-ptest += " \ python3-pytest \ - python3-unittest-automake-output \ "
Signature · 1 line
2.25.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [oe] [meta-python][kirkstone][PATCH] python3-pyyaml-include: Drop pytest --automake
Ping.
Thanks,
Quoted 44 lines · Mingli
From: Mingli Yu <[email protected]>
The python3-unittest-automake-output is not supported [1], so drop "pytest --automake".
[1] https://lore.kernel.org/all/[email protected]/T/#mda91919809cf156aba24f099bef65142067cd318
Signed-off-by Mingli Yu <[email protected]>--- .../recipes-devtools/python/python3-pyyaml-include/run-ptest | 2 +- .../recipes-devtools/python/python3-pyyaml-include_1.4.1.bb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)meta-python/recipes-devtools/python/python3-pyyaml-include/run-ptest +1
-1@@ -1,3 +1,3 @@ #!/bin/sh -pytest --automake +pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'meta-python/recipes-devtools/python/python3-pyyaml-include_1.4.1.bb +0
-2@@ -24,6 +24,5 @@ RDEPENDS:${PN} += " \ " RDEPENDS:${PN}-ptest += " \ python3-pytest \ - python3-unittest-automake-output \ " -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#110196): https://lists.openembedded.org/g/openembedded-devel/message/110196
Mute This Topic: https://lists.openembedded.org/mt/105817400/3618448
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 3/3 python3-pyyaml-include: Upgrade 1.3.2 -> 1.4.1
In reply to [email protected]From: Mingli Yu <[email protected]>
* Upgrade to 1.4.1 to make it work with setuptools 59.x as it doesn't support pep 621 [1], so remove pyproject.toml and add setup.cfg back [2].
* Add python3-toml to RDEPENDS to fix below error:
self = <yamlinclude.readers.TomlReader object at 0x7faceccdbd30>
def __call__(self):
if sys.version_info >= (3, 11):
with open(self._path, "rb") as fp:
return tomllib.load(fp)
else:
try:
import toml
except ImportError as err: # pragma: no cover
Quoted 1 line
raise ImportError(f'Un-supported file "{self._path}".\n
pip install tomlshould solve the problem.\n\n{err}')
E ImportError: Un-supported file "tests/data/include.d/1.toml".
E pip install toml should solve the problem.
E
E No module named 'toml'
../../python3.10/site-packages/yamlinclude/readers.py:69: ImportError
[1] https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[2] https://github.com/tanbro/pyyaml-include/issues/43
---
...aml-include_1.3.2.bb => python3-pyyaml-include_1.4.1.bb} | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
rename meta-python/recipes-devtools/python/{python3-pyyaml-include_1.3.2.bb => python3-pyyaml-include_1.4.1.bb} (86%)meta-python/recipes-devtools/python/python3-pyyaml-include_1.4.1.bb renamed from meta-python/recipes-devtools/python/python3-pyyaml-include_1.3.2.bb +3 -3
@@ -2,11 +2,10 @@ SUMMARY = "Extending PyYAML with a custom constructor for including YAML files w HOMEPAGE = "https://github.com/tanbro/pyyaml-include" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS += "python3-setuptools-scm-native" -SRCREV = "36b6975aa8fc7a6cbf37de40aa2ed6d996b2f7be" +SRCREV = "0f86bf16343d2ad52b53b793e0b35bb7ed7cd85b" SRC_URI = " \ - git://github.com/tanbro/pyyaml-include;protocol=https;branch=main \ + git://github.com/tanbro/pyyaml-include;protocol=https;branch=1.x \ file://run-ptest \ "
@@ -21,6 +20,7 @@ do_install_ptest() { RDEPENDS:${PN} += " \ python3-pyyaml \ + python3-toml \ " RDEPENDS:${PN}-ptest += " \ python3-pytest \
Signature · 1 line
2.25.1