package/python-crc: new package
PATCH 1/2 package/python-crc: new package
Signed-off-by Marcus Hoffmann <[email protected]>
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-crc/Config.in | 6 ++++++ package/python-crc/python-crc.hash | 5 +++++ package/python-crc/python-crc.mk | 14 ++++++++++++++ 5 files changed, 27 insertions(+) create mode 100644 package/python-crc/Config.in create mode 100644 package/python-crc/python-crc.hash create mode 100644 package/python-crc/python-crc.mk
DEVELOPERS +1 -0
@@ -2274,6 +2274,7 @@ N: Marcus Hoffmann <[email protected]> F: package/nethogs/ F: package/pico-sdk/ F: package/picotool/ +F: package/python-crc/ F: package/python-immutabledict/ F: package/python-jc/ F: package/python-pydantic/
package/Config.in +1 -0
@@ -1073,6 +1073,7 @@ menu "External python modules" source "package/python-contourpy/Config.in" source "package/python-couchdb/Config.in" source "package/python-crayons/Config.in" + source "package/python-crc/Config.in" source "package/python-crc16/Config.in" source "package/python-crcmod/Config.in" source "package/python-crontab/Config.in"
package/python-crc/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_CRC + bool "python-crc" + help + Pure Python CRC library. + + https://github.com/Nicoretti/crc
package/python-crc/python-crc.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/crc/json +md5 cca626fb7bc30b4c468216ca67ee21c2 crc-7.1.0.tar.gz +sha256 99dd540909a37ae4f62c65441df8ecb4e7f9af014fecaf4f331052a41d66c07d crc-7.1.0.tar.gz +# Locally computed sha256 checksums +sha256 803152006c87fdfd8b30b087734fd590e7a8d871df1a6de40a8fbdd27673907f LICENSE.txt
package/python-crc/python-crc.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-crc +# +################################################################################ + +PYTHON_CRC_VERSION = 7.1.0 +PYTHON_CRC_SOURCE = crc-$(PYTHON_CRC_VERSION).tar.gz +PYTHON_CRC_SITE = https://files.pythonhosted.org/packages/7e/e6/c3488c35ecae290751466252e5ea01ef50fc67bfc1a9aba43983329b7025 +PYTHON_CRC_SETUP_TYPE = poetry +PYTHON_CRC_LICENSE = BSD-2-Clause +PYTHON_CRC_LICENSE_FILES = LICENSE.txt + +$(eval $(python-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/python-crc: new runtime test
Signed-off-by Marcus Hoffmann <[email protected]>
--- DEVELOPERS | 2 ++ support/testing/tests/package/sample_python_crc.py | 7 +++++++ support/testing/tests/package/test_python_crc.py | 11 +++++++++++ 3 files changed, 20 insertions(+) create mode 100644 support/testing/tests/package/sample_python_crc.py create mode 100644 support/testing/tests/package/test_python_crc.py
DEVELOPERS +2 -0
@@ -2284,12 +2284,14 @@ F: package/python-ruamel-yaml-clib/ F: package/python-typing-inspection/ F: package/python-tzlocal/ F: package/python-waitress/ +F: support/testing/tests/package/test_python_crc.py F: support/testing/tests/package/test_python_fastapi.py F: support/testing/tests/package/test_python_pydantic.py F: support/testing/tests/package/test_python_pydantic_settings.py F: support/testing/tests/package/test_python_ruamel_yaml.py F: support/testing/tests/package/test_python_tzlocal.py F: support/testing/tests/package/test_python_waitress.py +F: support/testing/tests/package/sample_python_crc.py F: support/testing/tests/package/sample_python_fastapi.py F: support/testing/tests/package/sample_python_pydantic.py F: support/testing/tests/package/sample_python_pydantic_settings.py
support/testing/tests/package/sample_python_crc.py new file +7 -0
@@ -0,0 +1,7 @@ +from crc import Calculator, Crc8 + +expected = 0xBC +data = bytes([0, 1, 2, 3, 4, 5]) +calculator = Calculator(Crc8.CCITT) + +assert expected == calculator.checksum(data)
support/testing/tests/package/test_python_crc.py new file +11 -0
@@ -0,0 +1,11 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Crc(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_CRC=y + """ + sample_scripts = ["tests/package/sample_python_crc.py"]
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 1 line · Marcus Hoffmann via buildroot
Signed-off-by Marcus Hoffmann <[email protected]>
Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot