summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb')
-rw-r--r--meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb59
1 files changed, 59 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb b/meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb
new file mode 100644
index 0000000000..de610d7815
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pydantic_2.8.2.bb
@@ -0,0 +1,59 @@
1SUMMARY = "Data validation using Python type hinting"
2DESCRIPTION = "Data validation and settings management using Python \
3type hints.\
4\
5Fast and extensible, Pydantic plays nicely with your linters/IDE/brain. \
6Define how data should be in pure, canonical Python 3.7+; validate it with \
7Pydantic."
8HOMEPAGE = "https://github.com/samuelcolvin/pydantic"
9LICENSE = "MIT"
10LIC_FILES_CHKSUM = "file://LICENSE;md5=09280955509d1c4ca14bae02f21d49a6"
11
12inherit pypi python_hatchling
13
14SRC_URI[sha256sum] = "6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"
15
16DEPENDS += "python3-hatch-fancy-pypi-readme-native"
17
18RECIPE_NO_UPDATE_REASON = "Must be updated in sync with python3-pydantic-core."
19
20RDEPENDS:${PN} += "\
21 python3-annotated-types \
22 python3-core \
23 python3-datetime \
24 python3-image \
25 python3-io \
26 python3-json \
27 python3-logging \
28 python3-netclient \
29 python3-numbers \
30 python3-profile \
31 python3-pydantic-core \
32 python3-typing-extensions \
33"
34
35inherit ptest
36SRC_URI += "file://run-ptest"
37RDEPENDS:${PN}-ptest += "\
38 python3-cloudpickle \
39 python3-dirty-equals \
40 python3-email-validator \
41 python3-pydoc \
42 python3-pytest \
43 python3-pytest-mock \
44 python3-rich \
45 python3-unittest-automake-output \
46 python3-unixadmin \
47"
48
49do_install_ptest() {
50 cp -rf ${S}/tests/ ${D}${PTEST_PATH}/
51 # Requires 'ruff' (python3-ruff) which we cannot build
52 # until we have Rust 1.71+ in oe-core
53 rm -f ${D}${PTEST_PATH}/tests/test_docs.py
54 # We are not trying to support mypy
55 rm -f ${D}${PTEST_PATH}/tests/test_mypy.py
56 # We are not trying to run benchmarks
57 rm -rf ${D}${PTEST_PATH}/tests/benchmarks
58 sed -i -e "/--automake/ s/$/ -k 'not test_config_validation_error_cause and not test_dataclass_config_validate_default and not test_annotated_validator_nested and not test_use_bare and not test_use_no_fields and not test_validator_bad_fields_throws_configerror and not test_assert_raises_validation_error and not test_model_config_validate_default'/" ${D}${PTEST_PATH}/run-ptest
59}