git: e6ffc0453c74 - main - devel/py-msgspec: Add py-msgspec 0.18.6
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 05 Apr 2024 00:44:30 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=e6ffc0453c74f48031c7820db5dc43018e043151 commit e6ffc0453c74f48031c7820db5dc43018e043151 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2024-04-05 00:36:56 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-04-05 00:36:56 +0000 devel/py-msgspec: Add py-msgspec 0.18.6 msgspec is a fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML. It features: - High performance encoders/decoders for common protocols. The JSON and MessagePack implementations regularly benchmark as the fastest options for Python. - Support for a wide variety of Python types. Additional types may be supported through extensions. - Zero-cost schema validation using familiar Python type annotations. In benchmarks msgspec decodes and validates JSON faster than orjson can decode it alone. - A speedy Struct type for representing structured data. If you already use dataclasses or attrs, structs should feel familiar. However, they're 5-60x faster for common operations. All of this is included in a lightweight library with no required dependencies. --- devel/Makefile | 1 + devel/py-msgspec/Makefile | 38 ++++++++++++++++++++++++++++++++++++++ devel/py-msgspec/distinfo | 3 +++ devel/py-msgspec/pkg-descr | 15 +++++++++++++++ 4 files changed, 57 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index b11e93c47356..c35e7bca0246 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -5059,6 +5059,7 @@ SUBDIR += py-msal SUBDIR += py-msal-extensions SUBDIR += py-msgpack + SUBDIR += py-msgspec SUBDIR += py-mulpyplexer SUBDIR += py-multi_key_dict SUBDIR += py-multipart diff --git a/devel/py-msgspec/Makefile b/devel/py-msgspec/Makefile new file mode 100644 index 000000000000..ad36cdd42ab1 --- /dev/null +++ b/devel/py-msgspec/Makefile @@ -0,0 +1,38 @@ +PORTNAME= msgspec +PORTVERSION= 0.18.6 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Fast serialization and validation library +WWW= https://jcristharif.com/msgspec/ \ + https://github.com/jcrist/msgspec + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent pep517 + +#NO_ARCH= yes + +OPTIONS_DEFINE= TOML YAML +OPTIONS_DEFAULT=TOML YAML + +TOML_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tomli-w>=0:textproc/py-tomli-w@${PY_FLAVOR} +YAML_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml@${PY_FLAVOR} + +.include <bsd.port.pre.mk> + +.if ${PORT_OPTIONS:MTOML} && ${PYTHON_REL} < 31100 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tomli>=0:textproc/py-tomli@${PY_FLAVOR} +.endif + +post-install: + ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + + +.include <bsd.port.post.mk> diff --git a/devel/py-msgspec/distinfo b/devel/py-msgspec/distinfo new file mode 100644 index 000000000000..b8fdd0eb5d47 --- /dev/null +++ b/devel/py-msgspec/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1712084448 +SHA256 (msgspec-0.18.6.tar.gz) = a59fc3b4fcdb972d09138cb516dbde600c99d07c38fd9372a6ef500d2d031b4e +SIZE (msgspec-0.18.6.tar.gz) = 216757 diff --git a/devel/py-msgspec/pkg-descr b/devel/py-msgspec/pkg-descr new file mode 100644 index 000000000000..77f2ce419469 --- /dev/null +++ b/devel/py-msgspec/pkg-descr @@ -0,0 +1,15 @@ +msgspec is a fast serialization and validation library, with builtin support for +JSON, MessagePack, YAML, and TOML. It features: +- High performance encoders/decoders for common protocols. The JSON and + MessagePack implementations regularly benchmark as the fastest options for + Python. +- Support for a wide variety of Python types. Additional types may be supported + through extensions. +- Zero-cost schema validation using familiar Python type annotations. In + benchmarks msgspec decodes and validates JSON faster than orjson can decode it + alone. +- A speedy Struct type for representing structured data. If you already use + dataclasses or attrs, structs should feel familiar. However, they're 5-60x + faster for common operations. + +All of this is included in a lightweight library with no required dependencies.