package/python-ruamel-yaml: fix comment in hash file
PATCH 1/4 package/python-ruamel-yaml: fix comment in hash file
--- package/python-ruamel-yaml/python-ruamel-yaml.hash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/python-ruamel-yaml/python-ruamel-yaml.hash +1 -1
@@ -1,4 +1,4 @@ -# md5, sha256 from https://pypi.org/pypi/rfc3987/json +# md5, sha256 from https://pypi.org/pypi/ruamel.yaml/json md5 206bda0f33ab2c2f63777636200748b7 ruamel.yaml-0.17.21.tar.gz sha256 8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af ruamel.yaml-0.17.21.tar.gz # Locally computed sha256 checksums
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/4 support/testing: add new python-ruamel-yaml runtime test
--- .../package/sample_python_ruamel_yaml.py | 27 +++++++++++++++++++ .../tests/package/test_python_ruamel_yaml.py | 12 +++++++++ 2 files changed, 39 insertions(+) create mode 100644 support/testing/tests/package/sample_python_ruamel_yaml.py create mode 100644 support/testing/tests/package/test_python_ruamel_yaml.py
support/testing/tests/package/sample_python_ruamel_yaml.py new file +27 -0
@@ -0,0 +1,27 @@ +from ruamel.yaml import YAML + +yaml_text = """ +Rootkey: + - ListEntry +AnotherRootKey: some-string + +ListRoot: + - float-value: '1.0' + int-value: 10234 + NestedList: + - 1 + - 2 + + - another-float: '1.1' + another-int: 1111 + +OneMoreRootKey: 9.99 +""" + +# Tests the pure python based implementation +yaml = YAML(typ='safe', pure=True) + +parsed = yaml.load(yaml_text) + +assert parsed['OneMoreRootKey'] == 9.99 +assert parsed['ListRoot'][1]['another-int'] == 1111
support/testing/tests/package/test_python_ruamel_yaml.py new file +12 -0
@@ -0,0 +1,12 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3RuamelYaml(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_RUAMEL_YAML=y + """ + sample_scripts = ["tests/package/sample_python_ruamel_yaml.py"] + timeout = 40
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/4] support/testing: add new python-ruamel-yaml runtime test
Quoted 7 lines · On Wed, 7 Feb 2024 18:09:54 +0100 Marcus Hoffmann via buildroot…
Signed-off-by Marcus Hoffmann <[email protected]>--- .../package/sample_python_ruamel_yaml.py | 27 +++++++++++++++++++ .../tests/package/test_python_ruamel_yaml.py | 12 +++++++++ 2 files changed, 39 insertions(+) create mode 100644 support/testing/tests/package/sample_python_ruamel_yaml.py create mode 100644 support/testing/tests/package/test_python_ruamel_yaml.py
You had forgotten to add an entry in the DEVELOPERS file for those two new files, so I did that and applied. Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/4] support/testing: add new python-ruamel-yaml runtime test
In reply to Marcus Hoffmann via buildrootQuoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Marcus" == Marcus Hoffmann via buildroot <[email protected]> writes:
Signed-off-by Marcus Hoffmann <[email protected]>
Committed to 2024.02.x and 2024.05.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/4 package/python-ruamel-yaml-clib: new package
In reply to Marcus Hoffmann via buildrootAdd optional c extension for python-ruamel-yaml which can speed up yaml loading/parsing.
Extend the ruamel-yaml runtime test to check if the c extension works correctly.
--- package/Config.in | 1 + package/python-ruamel-yaml-clib/Config.in | 9 +++++++++ .../python-ruamel-yaml-clib.hash | 5 +++++ .../python-ruamel-yaml-clib.mk | 16 ++++++++++++++++ .../tests/package/sample_python_ruamel_yaml.py | 12 ++++++++++++ .../tests/package/test_python_ruamel_yaml.py | 1 + 6 files changed, 44 insertions(+) create mode 100644 package/python-ruamel-yaml-clib/Config.in create mode 100644 package/python-ruamel-yaml-clib/python-ruamel-yaml-clib.hash create mode 100644 package/python-ruamel-yaml-clib/python-ruamel-yaml-clib.mk
package/Config.in +1 -0
@@ -1320,6 +1320,7 @@ menu "External python modules" source "package/python-rtoml/Config.in" source "package/python-rtslib-fb/Config.in" source "package/python-ruamel-yaml/Config.in" + source "package/python-ruamel-yaml-clib/Config.in" source "package/python-s3transfer/Config.in" source "package/python-scandir/Config.in" source "package/python-scapy/Config.in"
package/python-ruamel-yaml-clib/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +if BR2_PACKAGE_PYTHON_RUAMEL_YAML +config BR2_PACKAGE_PYTHON_RUAMEL_YAML_CLIB + bool "python-ruamel-yaml-clib" + help + C version of reader, parser and emitter for ruamel.yaml + derived from libyaml + + https://sourceforge.net/projects/ruamel-yaml/ +endif
package/python-ruamel-yaml-clib/python-ruamel-yaml-clib.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/ruamel.yaml.clib/json +md5 b72e549363fa1b9c4f9123e98f2b46cc ruamel.yaml.clib-0.2.8.tar.gz +sha256 beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512 ruamel.yaml.clib-0.2.8.tar.gz +# Locally computed sha256 checksums +sha256 5458f90e82366f660f956b3c929ba5f7a0efdb99a99a847e2f51f2020ffbe887 LICENSE
package/python-ruamel-yaml-clib/python-ruamel-yaml-clib.mk new file +16 -0
@@ -0,0 +1,16 @@ +################################################################################ +# +# python-ruamel-yaml +# +################################################################################ + +PYTHON_RUAMEL_YAML_CLIB_VERSION = 0.2.8 +PYTHON_RUAMEL_YAML_CLIB_SOURCE = ruamel.yaml.clib-$(PYTHON_RUAMEL_YAML_CLIB_VERSION).tar.gz +PYTHON_RUAMEL_YAML_CLIB_SITE = https://files.pythonhosted.org/packages/46/ab/bab9eb1566cd16f060b54055dd39cf6a34bfa0240c53a7218c43e974295b +PYTHON_RUAMEL_YAML_CLIB_SETUP_TYPE = setuptools +PYTHON_RUAMEL_YAML_CLIB_LICENSE = MIT +PYTHON_RUAMEL_YAML_CLIB_LICENSE_FILES = LICENSE +PYTHON_RUAMEL_YAML_CLIB_CPE_ID_VENDOR = ruamel.yaml_project +PYTHON_RUAMEL_YAML_CLIB_CPE_ID_PRODUCT = ruamel.yaml + +$(eval $(python-package))
support/testing/tests/package/sample_python_ruamel_yaml.py +12 -0
@@ -25,3 +25,15 @@ parsed = yaml.load(yaml_text) assert parsed['OneMoreRootKey'] == 9.99 assert parsed['ListRoot'][1]['another-int'] == 1111 + +# Tests the C extension based loader +# ruamel.yaml automatically falls back to the pure python version, so we need +# to explicitly check if importing the CLoader works here. +# Import this here, so it's clearer what part of the test is failing. +from ruamel.yaml import CLoader # noqa: E402 +assert CLoader is not None +yaml = YAML(typ='safe') +parsed_from_c = yaml.load(yaml_text) + +assert parsed_from_c['OneMoreRootKey'] == 9.99 +assert parsed_from_c['ListRoot'][1]['another-int'] == 1111
support/testing/tests/package/test_python_ruamel_yaml.py +1 -0
@@ -7,6 +7,7 @@ class TestPythonPy3RuamelYaml(TestPythonPackageBase): """ BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_RUAMEL_YAML=y + BR2_PACKAGE_PYTHON_RUAMEL_YAML_CLIB=y """ sample_scripts = ["tests/package/sample_python_ruamel_yaml.py"] timeout = 40
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 3/4] package/python-ruamel-yaml-clib: new package
Hello Marcus,
package/python-ruamel-yaml-clib/Config.in line 3
Quoted 9 lines · On Wed, 7 Feb 2024 18:09:55 +0100 Marcus Hoffmann via buildroot…
package/python-ruamel-yaml-clib/Config.in new file +3
-0@@ -0,0 +1,9 @@ +if BR2_PACKAGE_PYTHON_RUAMEL_YAML +config BR2_PACKAGE_PYTHON_RUAMEL_YAML_CLIB + bool "python-ruamel-yaml-clib"
Changed the if BR2_PACKAGE_PYTHON_RUAMEL_YAML to a depends on BR2_PACKAGE_PYTHON_RUAMEL_YAML, which is more common for this type of situation IMO.
package/python-ruamel-yaml-clib/python-ruamel-yaml-clib.mk line 3
Quoted 9 lines
package/python-ruamel-yaml-clib/python-ruamel-yaml-clib.mk new file +3
-0@@ -0,0 +1,16 @@ +################################################################################ +# +# python-ruamel-yaml
Bad copy/paste, should have been python-ruamel-yaml-clib.
package/python-ruamel-yaml-clib/python-ruamel-yaml-clib.mk line 14
Quoted 11 lines
package/python-ruamel-yaml-clib/python-ruamel-yaml-clib.mk new file +11
-0+# +################################################################################ + +PYTHON_RUAMEL_YAML_CLIB_VERSION = 0.2.8 +PYTHON_RUAMEL_YAML_CLIB_SOURCE = ruamel.yaml.clib-$(PYTHON_RUAMEL_YAML_CLIB_VERSION).tar.gz +PYTHON_RUAMEL_YAML_CLIB_SITE = https://files.pythonhosted.org/packages/46/ab/bab9eb1566cd16f060b54055dd39cf6a34bfa0240c53a7218c43e974295b +PYTHON_RUAMEL_YAML_CLIB_SETUP_TYPE = setuptools +PYTHON_RUAMEL_YAML_CLIB_LICENSE = MIT +PYTHON_RUAMEL_YAML_CLIB_LICENSE_FILES = LICENSE +PYTHON_RUAMEL_YAML_CLIB_CPE_ID_VENDOR = ruamel.yaml_project +PYTHON_RUAMEL_YAML_CLIB_CPE_ID_PRODUCT = ruamel.yaml
I dropped those two lines. Indeed, the CPE vendor/product (at least product) cannot be the same as for python-ruamel-yaml, as they have different versioning.
Also, the entry in the DEVELOPERS file was missing, so I added it.
Applied with those fixes. Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 4/4 package/python-ruamel-yaml: bump to version 0.18.5
In reply to Marcus Hoffmann via buildrootFrom: James Hilliard <[email protected]>
License hash changed due to year update:
https://sourceforge.net/p/ruamel-yaml/code/ci/56b3e2666fb275deab3eec99193c103e4edf93bb/
--- package/python-ruamel-yaml/python-ruamel-yaml.hash | 6 +++--- package/python-ruamel-yaml/python-ruamel-yaml.mk | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
package/python-ruamel-yaml/python-ruamel-yaml.hash +3 -3
@@ -1,5 +1,5 @@ # md5, sha256 from https://pypi.org/pypi/ruamel.yaml/json -md5 206bda0f33ab2c2f63777636200748b7 ruamel.yaml-0.17.21.tar.gz -sha256 8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af ruamel.yaml-0.17.21.tar.gz +md5 24fac3544a3c7bd7eeaf6e4f704a056e ruamel.yaml-0.18.5.tar.gz +sha256 61917e3a35a569c1133a8f772e1226961bf5a1198bea7e23f06a0841dea1ab0e ruamel.yaml-0.18.5.tar.gz # Locally computed sha256 checksums -sha256 ab837b032c5aae84503fc0c733a116a26fd272e90dc4402fa68d3c9e51aed3b0 LICENSE +sha256 ba45629abb7022949148ce65de4a59e7ee164d30c94450389a6afdd3ebe4e9e0 LICENSE
package/python-ruamel-yaml/python-ruamel-yaml.mk +2 -2
@@ -4,9 +4,9 @@ # ################################################################################ -PYTHON_RUAMEL_YAML_VERSION = 0.17.21 +PYTHON_RUAMEL_YAML_VERSION = 0.18.5 PYTHON_RUAMEL_YAML_SOURCE = ruamel.yaml-$(PYTHON_RUAMEL_YAML_VERSION).tar.gz -PYTHON_RUAMEL_YAML_SITE = https://files.pythonhosted.org/packages/46/a9/6ed24832095b692a8cecc323230ce2ec3480015fbfa4b79941bd41b23a3c +PYTHON_RUAMEL_YAML_SITE = https://files.pythonhosted.org/packages/82/43/fa976e03a4a9ae406904489119cd7dd4509752ca692b2e0a19491ca1782c PYTHON_RUAMEL_YAML_SETUP_TYPE = setuptools PYTHON_RUAMEL_YAML_LICENSE = MIT PYTHON_RUAMEL_YAML_LICENSE_FILES = LICENSE
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedRe: [Buildroot] [PATCH 4/4] package/python-ruamel-yaml: bump to version 0.18.5
Quoted 11 lines · On Wed, 7 Feb 2024 18:09:56 +0100 Marcus Hoffmann via buildroot…
From: James Hilliard <[email protected]>
License hash changed due to year update:
https://sourceforge.net/p/ruamel-yaml/code/ci/56b3e2666fb275deab3eec99193c103e4edf93bb/Signed-off-by James Hilliard <[email protected]>Signed-off-by Marcus Hoffmann <[email protected]>--- package/python-ruamel-yaml/python-ruamel-yaml.hash | 6 +++--- package/python-ruamel-yaml/python-ruamel-yaml.mk | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 4 lines · On Wed, 7 Feb 2024 18:09:53 +0100 Marcus Hoffmann via buildroot…
Signed-off-by Marcus Hoffmann <[email protected]>--- package/python-ruamel-yaml/python-ruamel-yaml.hash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Marcus" == Marcus Hoffmann via buildroot <[email protected]> writes:
Signed-off-by Marcus Hoffmann <[email protected]>
Committed to 2024.02.x and 2024.05.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot