Skip to contentSkip to conversation

package/python-dtschema: new package

PATCH In review yegorslists--- via buildroot 2 participants 3 messages Aug 4, 2022 – Aug 7, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/python-dtschema: new package

From: Yegor Yefremov <[email protected]>

---
 package/Config.in                            |  1 +
 package/python-dtschema/Config.in            | 10 ++++++++++
 package/python-dtschema/python-dtschema.hash |  5 +++++
 package/python-dtschema/python-dtschema.mk   | 15 +++++++++++++++
 4 files changed, 31 insertions(+)
 create mode 100644 package/python-dtschema/Config.in
 create mode 100644 package/python-dtschema/python-dtschema.hash
 create mode 100644 package/python-dtschema/python-dtschema.mk
package/Config.in +1 -0
index 61783ba400..93bd5571cb 100644
@@ -1022,6 +1022,7 @@ menu "External python modules"
 	source "package/python-docutils/Config.in"
 	source "package/python-dominate/Config.in"
 	source "package/python-dpkt/Config.in"
+	source "package/python-dtschema/Config.in"
 	source "package/python-ecdsa/Config.in"
 	source "package/python-engineio/Config.in"
 	source "package/python-entrypoints/Config.in"
package/python-dtschema/Config.in new file +10 -0
new file mode 100644
index 0000000000..961d0e04b2
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_PYTHON_DTSCHEMA
+	bool "python-dtschema"
+	select BR2_PACKAGE_PYTHON_JSONSCHEMA # runtime
+	select BR2_PACKAGE_PYTHON_PYLIBFDT # runtime
+	select BR2_PACKAGE_PYTHON_RFC3987 # runtime
+	select BR2_PACKAGE_PYTHON_RUAMEL_YAML # runtime
+	help
+	  DeviceTree validation schema and tools.
+
+	  https://github.com/devicetree-org/dt-schema
package/python-dtschema/python-dtschema.hash new file +5 -0
new file mode 100644
index 0000000000..7b183e28e3
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/dtschema/json
+md5  ed75defac9a7297a567f278994b14d5b  dtschema-2022.8.tar.gz
+sha256  1befe7c9f74cea248a8b524cf6185ac48912a5b2aae96854d77cb94584433ca4  dtschema-2022.8.tar.gz
+# Locally computed sha256 checksums
+sha256  ca0d66263406dc684fe9db60577b234f65ffdf620d7e041c708e969447b69111  LICENSE.txt
package/python-dtschema/python-dtschema.mk new file +15 -0
new file mode 100644
index 0000000000..263061dc98
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-dtschema
+#
+################################################################################
+
+PYTHON_DTSCHEMA_VERSION = 2022.8
+PYTHON_DTSCHEMA_SOURCE = dtschema-$(PYTHON_DTSCHEMA_VERSION).tar.gz
+PYTHON_DTSCHEMA_SITE = https://files.pythonhosted.org/packages/95/be/cb576760b9578cb69da020aeb80f3c2d05ff46b4090ab350c1e05691329e
+PYTHON_DTSCHEMA_SETUP_TYPE = setuptools
+PYTHON_DTSCHEMA_LICENSE = BSD-2-Clause
+PYTHON_DTSCHEMA_LICENSE_FILES = LICENSE.txt
+PYTHON_DTSCHEMA_DEPENDENCIES = host-python-setuptools-scm
+
+$(eval $(python-package))
Signature · 6 lines
2.17.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 support/testing: add test for python-dtschema

From: Yegor Yefremov <[email protected]>

---
 DEVELOPERS                                           |  1 +
 .../testing/tests/package/sample_python_dtschema.py  |  1 +
 .../testing/tests/package/test_python_dtschema.py    | 12 ++++++++++++
 3 files changed, 14 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_dtschema.py
 create mode 100644 support/testing/tests/package/test_python_dtschema.py
DEVELOPERS +1 -0
index 63bb80fc9d..4ca9567b46 100644
@@ -3131,6 +3131,7 @@ F:	package/x11r7/xapp_xinput-calibrator/
 F:	package/zlog/
 F:	support/testing/tests/package/test_libftdi1.py
 F:	support/testing/tests/package/test_python_can.py
+F:	support/testing/tests/package/test_python_dtschema.py
 F:	utils/scanpypi
 
 N:	Yunhao Tian <[email protected]>
support/testing/tests/package/sample_python_dtschema.py new file +1 -0
new file mode 100644
index 0000000000..786c3d5a71
@@ -0,0 +1 @@
+import dtschema
support/testing/tests/package/test_python_dtschema.py new file +12 -0
new file mode 100644
index 0000000000..e3a4a309c1
@@ -0,0 +1,12 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Dtschema(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_DTSCHEMA=y
+        """
+    sample_scripts = ["tests/package/sample_python_dtschema.py"]
+    timeout = 40
Signature · 6 lines
2.17.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to yegorslists--- via buildroot
Quoted 12 lines · On Thu, 4 Aug 2022 07:23:31 +0200 yegorslists--- via buildroot…

From: Yegor Yefremov <[email protected]>

---
 package/Config.in                            |  1 +
 package/python-dtschema/Config.in            | 10 ++++++++++
 package/python-dtschema/python-dtschema.hash |  5 +++++
 package/python-dtschema/python-dtschema.mk   | 15 +++++++++++++++
 4 files changed, 31 insertions(+)
 create mode 100644 package/python-dtschema/Config.in
 create mode 100644 package/python-dtschema/python-dtschema.hash
 create mode 100644 package/python-dtschema/python-dtschema.mk

Thanks, both applied. On the second patch, adding the sample test script in DEVELOPERS file was missing (the test itself was added, but not the sample script), so I fixed that up when applying.

Thanks again!

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