package/python-pydantic-core: new package

Although pydantic-core likely implements a subset of the functionality
in pydantic 1.10.8 as we currently package, there will not be any
conflict as the modules namespace differ:

    import pydantic  # 1.10.8
    import pydantic_core

So, we can add pydantic-core, then bump pydantic; we don't need to do
both in the same commit.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[yann.morin.1998@free.fr: add explanations from James about no-conflict]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
James Hilliard 2023-11-25 01:10:51 -07:00 committed by Yann E. MORIN
parent 0f26d43427
commit 92fcdbd3e2
4 changed files with 28 additions and 0 deletions

View File

@ -1228,6 +1228,7 @@ menu "External python modules"
source "package/python-pycups/Config.in"
source "package/python-pydal/Config.in"
source "package/python-pydantic/Config.in"
source "package/python-pydantic-core/Config.in"
source "package/python-pydevmem/Config.in"
source "package/python-pydyf/Config.in"
source "package/python-pyelftools/Config.in"

View File

@ -0,0 +1,8 @@
config BR2_PACKAGE_PYTHON_PYDANTIC_CORE
bool "python-pydantic-core"
depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS # runtime
help
Core validation logic for pydantic written in rust.
https://github.com/pydantic/pydantic-core

View File

@ -0,0 +1,4 @@
# Locally calculated after vendoring
sha256 b54296f8317e7ffd72726836636aa3a6c8c977d8f73b68253c443c0fe3731064 pydantic_core-2.14.5.tar.gz
# Locally computed sha256 checksums
sha256 2afdd30d54b4d62b6f488a6bcc1546e84ec5061f13f4209c03d012348783795a LICENSE

View File

@ -0,0 +1,15 @@
################################################################################
#
# python-pydantic-core
#
################################################################################
PYTHON_PYDANTIC_CORE_VERSION = 2.14.5
PYTHON_PYDANTIC_CORE_SOURCE = pydantic_core-$(PYTHON_PYDANTIC_CORE_VERSION).tar.gz
PYTHON_PYDANTIC_CORE_SITE = https://files.pythonhosted.org/packages/64/26/cffb93fe9c6b5a91c497f37fae14a4b073ecbc47fc36a9979c7aa888b245
PYTHON_PYDANTIC_CORE_SETUP_TYPE = maturin
PYTHON_PYDANTIC_CORE_LICENSE = MIT
PYTHON_PYDANTIC_CORE_LICENSE_FILES = LICENSE
PYTHON_PYDANTIC_CORE_DEPENDENCIES = host-python-typing-extensions
$(eval $(python-package))