diff options
| author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2023-07-09 10:10:21 +0000 |
|---|---|---|
| committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2023-07-09 10:10:21 +0000 |
| commit | faa87a12d4820f18a97af9de9feb19624bf21665 (patch) | |
| tree | 847f0bfff7a2c21934a865f7b00f3df2215a5d47 | |
| parent | c6a13c6a8342ee029b240ece46013d5792d78d9a (diff) | |
devel/py-annotated-types: Add py-annotated-types 0.5.0
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.
annotated-types 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.
| -rw-r--r-- | devel/Makefile | 1 | ||||
| -rw-r--r-- | devel/py-annotated-types/Makefile | 28 | ||||
| -rw-r--r-- | devel/py-annotated-types/distinfo | 3 | ||||
| -rw-r--r-- | devel/py-annotated-types/pkg-descr | 9 |
4 files changed, 41 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index efebea912f3e..05762b4586ed 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4204,6 +4204,7 @@ SUBDIR += py-aniso8601 SUBDIR += py-aniso86016 SUBDIR += py-anndata + SUBDIR += py-annotated-types SUBDIR += py-ansi SUBDIR += py-antlr4-python3-runtime SUBDIR += py-anyconfig diff --git a/devel/py-annotated-types/Makefile b/devel/py-annotated-types/Makefile new file mode 100644 index 000000000000..ea62c4d94cfb --- /dev/null +++ b/devel/py-annotated-types/Makefile @@ -0,0 +1,28 @@ +PORTNAME= annotated-types +PORTVERSION= 0.5.0 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= annotated_types-${PORTVERSION} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Reusable constraint types to use with typing.Annotated +WWW= https://github.com/annotated-types/annotated-types + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent pep517 + +NO_ARCH= yes + +.include <bsd.port.pre.mk> + +.if ${PYTHON_REL} < 30900 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.0.0:devel/py-typing-extensions@${PY_FLAVOR} +.endif + +.include <bsd.port.post.mk> diff --git a/devel/py-annotated-types/distinfo b/devel/py-annotated-types/distinfo new file mode 100644 index 000000000000..db629c8ac445 --- /dev/null +++ b/devel/py-annotated-types/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1688166004 +SHA256 (annotated_types-0.5.0.tar.gz) = 47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802 +SIZE (annotated_types-0.5.0.tar.gz) = 13504 diff --git a/devel/py-annotated-types/pkg-descr b/devel/py-annotated-types/pkg-descr new file mode 100644 index 000000000000..7461be5f5846 --- /dev/null +++ b/devel/py-annotated-types/pkg-descr @@ -0,0 +1,9 @@ +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. + +annotated-types 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. |
