From 36eb48465b6e9177b1b3c067f599dddc6cf69ab1 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 14 Oct 2023 02:34:23 +0800 Subject: [PATCH] python-jsonschema: Update to 4.19.1, update list of dependencies This also adds a test.sh script for the packages feed CI. Signed-off-by: Jeffery To --- lang/python/python-jsonschema/Makefile | 19 +++++++++++++------ lang/python/python-jsonschema/test.sh | 21 +++++++++++++++++++++ 2 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 lang/python/python-jsonschema/test.sh diff --git a/lang/python/python-jsonschema/Makefile b/lang/python/python-jsonschema/Makefile index 4c6e44d468..4e3b9c7e41 100644 --- a/lang/python/python-jsonschema/Makefile +++ b/lang/python/python-jsonschema/Makefile @@ -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 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 index 0000000000..37fe4925a9 --- /dev/null +++ b/lang/python/python-jsonschema/test.sh @@ -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