From febdc2574f0d261dd4e5819fd6c39e460ae489bc Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Thu, 28 Mar 2024 10:41:26 +0200 Subject: [PATCH] python-annotated-types: add version 0.6.0 Annotated-types is dependency for pydantic v2 packages, so add package for it so that pydantic v2 package dependencies can be handled correctly. Signed-off-by: Ilkka Ollakka --- lang/python/python-annotated-types/Makefile | 44 +++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 lang/python/python-annotated-types/Makefile diff --git a/lang/python/python-annotated-types/Makefile b/lang/python/python-annotated-types/Makefile new file mode 100644 index 0000000000..6a0cabfac4 --- /dev/null +++ b/lang/python/python-annotated-types/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2024, Clouder Oy +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-annotated-types +PKG_VERSION:=0.6.0 +PKG_RELEASE:=1 + +PYPI_NAME:=annotated_types + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Ilkka Ollakka +PKG_HASH:=563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-annotated-types + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Annotated-types + URL:=https://github.com/annotated-types/annotated-types + DEPENDS:= \ + +python3-light \ + +python3-typing-extensions +endef + +define Package/python3-annotated-types/description +PEP-593 added typing.Annotated as a way of adding context-specific metadata to existing types, and specifies that Annotated[T, x] should be treated as T by any tool or library without special logic for x. + +This package provides metadata objects which can be used to represent common constraints such as upper and lower bounds on scalar values and collection sizes, a Predicate marker for runtime checks, and descriptions of how we intend these metadata to be interpreted. In some cases, we also note alternative representations which do not require this package. +endef + +$(eval $(call Py3Package,python3-annotated-types)) +$(eval $(call BuildPackage,python3-annotated-types)) +$(eval $(call BuildPackage,python3-annotated-types-src))