python-jsonschema: Update to 4.19.1, update list of dependencies
authorJeffery To <jeffery.to@gmail.com>
Fri, 13 Oct 2023 18:34:23 +0000 (02:34 +0800)
committerTianling Shen <cnsztl@gmail.com>
Thu, 30 Nov 2023 04:57:27 +0000 (12:57 +0800)
This also adds a test.sh script for the packages feed CI.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/python/python-jsonschema/Makefile
lang/python/python-jsonschema/test.sh [new file with mode: 0644]

index 4c6e44d4680c7a1c585bd2a4e6b68082f3de0b79..4e3b9c7e41818ae65f3d5c86350179e658a34fd0 100644 (file)
@@ -1,11 +1,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-jsonschema
-PKG_VERSION:=4.17.3
-PKG_RELEASE:=3
+PKG_VERSION:=4.19.1
+PKG_RELEASE:=1
 
 PYPI_NAME:=jsonschema
-PKG_HASH:=0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d
+PKG_HASH:=ec84cc37cfa703ef7cd4928db24f9cb31428a5d0fa77747b8b51a847458e0bbf
 
 PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 PKG_LICENSE:=MIT
@@ -22,9 +22,16 @@ define Package/python3-jsonschema
   CATEGORY:=Languages
   SUBMENU:=Python
   TITLE:=An implementation of JSON Schema validation
-  URL:=https://github.com/Julian/jsonschema
-  DEPENDS:=+python3-light +python3-attrs +python3-urllib \
-         +python3-six +python3-pyrsistent +python3-setuptools
+  URL:=https://github.com/python-jsonschema/jsonschema
+  DEPENDS:= \
+         +python3-light \
+         +python3-decimal \
+         +python3-urllib \
+         +python3-uuid \
+         +python3-attrs \
+         +python3-jsonschema-specifications \
+         +python3-referencing \
+         +python3-rpds-py
 endef
 
 define Package/python3-jsonschema/description
diff --git a/lang/python/python-jsonschema/test.sh b/lang/python/python-jsonschema/test.sh
new file mode 100644 (file)
index 0000000..37fe492
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+[ "$1" = python3-jsonschema ] || exit 0
+
+python3 - << 'EOF'
+
+from jsonschema import validate
+
+# A sample schema, like what we'd get from json.load()
+schema = {
+    "type" : "object",
+    "properties" : {
+        "price" : {"type" : "number"},
+        "name" : {"type" : "string"},
+    },
+}
+
+# If no exception is raised by validate(), the instance is valid.
+validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema)
+
+EOF