dev-python/pydantic: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2025-10-18 07:26:32 +02:00
parent 0c8d99a383
commit 25f7748386
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E
6 changed files with 0 additions and 836 deletions

View File

@ -47,17 +47,8 @@ DIST portable-atomic-1.6.0.crate 140689 BLAKE2B c91d06e04a87c9a207233d8a850859aa
DIST proc-macro2-1.0.86.crate 48958 BLAKE2B 4b89e07f23af8328dbb34fe2b3f1b202f1e6a3885a6269740a23359b41bb4099ac2484565d3b2b0936261689ca525785ac620c766997234fd8d0f409e80e5ea3 SHA512 1cdb7e22a35ae231d880c9420784c9acf97bda2db258b3d34aae5061dc1858449defe19a49e12c6a4173906aa72a4115059ac2db0fc760205fd2ab8b5b414434
DIST pydantic-2.11.10.tar.gz 788494 BLAKE2B 0fad8fa9baf40869df8ccb2715dc314ff64f7c21c20328be6b8c7387f4efbab92e681bc11660cdb321e12b462e1cd908bd0ae4c9c91b1d9a9ee6b072512badc7 SHA512 7bebff22b441bf0708457ed6b93909b4e2faaa7ff168323646bc61722fddc4497ceff8fc1759b9237a57a223f08c8ef450a0c9e062cee54e97c6ebc5f396b59a
DIST pydantic-2.11.7.tar.gz 788350 BLAKE2B 4767f593beb649fe3139f3b22e3814a9f56793494dc17428cf70952451e9112d03b275c0af979f0f0159b25deae2e2794bfdb1392e2c3499220ad3cd67945414 SHA512 54ee1a49d5a429cad31928425c197139ae3cce004d8f3530835ce39897be9afa6aea35e639af1d6290bace7148e1369ce66840e26bced329bc2e7d93b3dad6e5
DIST pydantic-2.11.8.tar.gz 788452 BLAKE2B 91c967ddf3f6ad6ec3713e1503e35d43adffc3160d9a4df2710db4ccab4c313ef8009de379473f7438d3f0ce716408b924963974d381bf27232aafb5afb960b1 SHA512 f06b821d84cecc6b1b9f364d35ae67cd79fd25dc356922d4af4418ad77dacc57ba327febc7fd33dee5cf070f8e9018ee3362c8f0aa8a5802a6af2ff327018254
DIST pydantic-2.11.9.tar.gz 788495 BLAKE2B d22e4aef09d65c30829dfb31d161c82511cc8e1a1b57dde08008462f42a23e4653979ff0578ab571314538d1267b8628bb4ab0eb4fe9af59ed2023c83f33a530 SHA512 32bcaf1de12d2df2344222389c8deefb88432886449ad52b420b4ff760b7b882522d416996fdea4d44a6cf4d24f96b2aec55d003e9772e28b2cacd654eed64fb
DIST pydantic-2.12.0.tar.gz 814760 BLAKE2B e827366bb224d20dd0a527793f0679caf81c4b0553bebe6163107f1157eeefc768066f03551d857fb934d4dc0949d2841b875af2cd71b73cc8fbd4c569c38637 SHA512 f3694cdd347af6d436dd85f27d00faf4459188d2825a2c6b7b31d15ba7fef0b37fd681f8b070ec648b1b5eb5eedc52245741902aecdc5d297202ef009ec26a91
DIST pydantic-2.12.1.tar.gz 815997 BLAKE2B 09e9a2cfe5dbc712007161d53544a2334ee8b13676a5b75319d42ce814f3705ffe0a40c2f7c206c9cc284de5e624cbd5fca52afb6c5c45ddb2804e40201fe100 SHA512 13fd00df72b9b23e5fad277fbe05fcaf4acc42ef2736a568569e7a15889bbf69fe6865f4849c5ff746b890cf0417cf5e483c5ec987e9290e4e0f27d89e6a273b
DIST pydantic-2.12.1.tar.gz.provenance 9008 BLAKE2B b833f79eef6ed015ccba9311f8821f22c4eb325e9db83f96003fc9051f18bdd951ceb5ecc9f80c2b937e2210723bcd17aa0143e6a22f0395b01a82b23a49df7f SHA512 ad4fbe39df30dd65186a0798f0f23492b98f0eddbb8cdcddc2bf9d5c65d217ed410e022daaa96b704d6a260a2590485554b107f261f844c8e3d786e6688488ce
DIST pydantic-2.12.2.tar.gz 816358 BLAKE2B 8b4efd9d6880deade3b4366d449d2a1c39c3fffeb300e56c213ab8aec80060aa23c305fe031efb0726a32b55568a1712594b3194dbc6d9aa1fc770331fe64a7d SHA512 2f36aef5400c6907a98c63d9fda0036a690899ac18f22a69906c952990ba30ad62ceb6a8779c57bbeb436a3b275e7ee023bd7433fa4a4153f90931dce84931d5
DIST pydantic-2.12.2.tar.gz.provenance 9345 BLAKE2B bddbc886197130418681489fe021a55baf0ffc98e3c99c04590eaee6b669e5db7c00df30201a894640ee609f9f62c3bf728a5d1ba89926e803fb2f2786b09c5f SHA512 88bc8061c72bb119ab3da508fa0ce60f3cc141e987f02c4f65348e169a54b049f017b39ba813d08dfec5b00620c0c391b2e832a7e53d2a7d88b24a85ee565cb4
DIST pydantic-2.12.3.tar.gz 819383 BLAKE2B 77e7242c478ad0cb686334207737d93e7381e6cd91117859e7755460d1adb05e73af1ace2733a3a4e8fca37bd5f063a643841a190c5d04c4519087e0d2d82549 SHA512 46af1777b4fa11d5e24ef8de93bad0eef3e0250150bdfdbd75be21d139925a58c32f526053675c1c022a229641763d7de6fa8f7ef81f86553572c366bd5cc341
DIST pydantic-2.12.3.tar.gz.provenance 9153 BLAKE2B 9e7de239ba62592cf420a77a85cd64e7ace52d7cc8eb8069af6b0d811e6ce740602df7ec6af97086659437b400d5faece4ed9190ba9fa590eab747c766c14cf2 SHA512 1c3cf685838846b350f309b2ec71f7794490277bcfd799031decc53bf4ccb2eb634952103b37148b3a3cd14b5f009845bb40f97047f865d24f23b26136c9bf38
DIST pydantic_core-2.41.1.tar.gz 454870 BLAKE2B 8f02136a593a1b7613ed417d7e4edae1dc56d8ee06c1e92b336ade41d66a977668c2603360d85a7e36b273ae3215e878c3bda0c7d400cf4b528f5862a898fd75 SHA512 63d2d3cdfc2be673b6e60d677e3415f5b8718dbe857560110d22d7da31c5f4184fc7bcabafd24fb46d9763fbc9c64256c0d0f5de58ee915cb1b3cf32e9a65c1e
DIST pydantic_core-2.41.3.tar.gz 457489 BLAKE2B 77a19a5f3e7f6cd9c8e68c7b177cdf4d8b5add3af5b781c423e8cf92f35c7e92984f9130bec5f7a4e069512dfde97e122d62d44418edc0fe007284ff12bcb240 SHA512 5c5fe5c69278a448f39678dd1c44b3588fc2996215873dbdf94071c743b4f976c2ec7e5dea66b6261729cd78b8694f57c79191a2a7e7533a3c035d734a7bcc73
DIST pydantic_core-2.41.4.tar.gz 457557 BLAKE2B ebff295fe3a735fe29fd1c2384eb54c44f783413e849848392eff23e317f3e6650567211a284c2f5df5318827e447ff4ab457f7d63984e3a618698f3b9bfc243 SHA512 aced59b149d48956220407ff42001167c7fa98f3ae7539bab0b16011bf9a38d9c1e8994770db7bb0426114d3322316cb3ce12cb1961d54f6a4798d8b00d1ee85
DIST pyo3-0.26.0.crate 1151579 BLAKE2B bcc8236785502928bf4a0b7a320e0a8f3d6140c562de4351a52d015aaebb8dd6b4d68fe607c8ea13ec66941c8f01d2c18c4249adfacb521355d4bf158667f3a3 SHA512 e073a4d893f88aa0301ef0ead78048137515edd93c490e6dccbc301ff65a208534c65c1d216b04639d4b1ec1e4b69bc87bd34974e5d0659134c28dcce589c194
DIST pyo3-build-config-0.26.0.crate 34309 BLAKE2B 5ea8b51da2f425674cd3bfcc1090ffdd08da01d2161dc66b08995c20cc859422f9f84077c545e5a0580182910aeb9dbba97838915148a82b86948d1cca3c8722 SHA512 a982d0a0baa4af58c2cef7c0c4b2671e3f559ca7f30586eda9fbd05e842efa2bfea0089ddbc729225b848871f6a25f85e86576e1dff519192ba289cd92c6aa8b

View File

@ -1,71 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
# py3.14: https://github.com/pydantic/pydantic/issues/11613
PYTHON_COMPAT=( pypy3_11 python3_{11..13} )
inherit distutils-r1 pypi
DESCRIPTION="Data parsing and validation using Python type hints"
HOMEPAGE="
https://github.com/pydantic/pydantic/
https://pypi.org/project/pydantic/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
>=dev-python/annotated-types-0.6.0[${PYTHON_USEDEP}]
~dev-python/pydantic-core-2.33.2[${PYTHON_USEDEP}]
>=dev-python/typing-extensions-4.12.2[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.0[${PYTHON_USEDEP}]
dev-python/tzdata[${PYTHON_USEDEP}]
"
BDEPEND="
>=dev-python/hatch-fancy-pypi-readme-22.5.0[${PYTHON_USEDEP}]
test? (
$(python_gen_cond_dep '
dev-python/cloudpickle[${PYTHON_USEDEP}]
' 'python3*')
dev-python/dirty-equals[${PYTHON_USEDEP}]
>=dev-python/email-validator-2.0.0[${PYTHON_USEDEP}]
>=dev-python/faker-18.13.0[${PYTHON_USEDEP}]
>=dev-python/jsonschema-4.23.0[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/rich[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( pytest-mock )
distutils_enable_tests pytest
src_prepare() {
sed -i -e '/benchmark/d' pyproject.toml || die
distutils-r1_src_prepare
}
python_test() {
local EPYTEST_DESELECT=(
# -Werror, sigh
tests/test_types_typeddict.py::test_readonly_qualifier_warning
)
local EPYTEST_IGNORE=(
# require pytest-examples
tests/test_docs.py
# benchmarks
tests/benchmarks
)
if ! has_version "dev-python/cloudpickle[${PYTHON_USEDEP}]"; then
EPYTEST_IGNORE+=(
tests/test_pickle.py
)
fi
epytest
}

View File

@ -1,71 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
# py3.14: https://github.com/pydantic/pydantic/issues/11613
PYTHON_COMPAT=( pypy3_11 python3_{11..13} )
inherit distutils-r1 pypi
DESCRIPTION="Data parsing and validation using Python type hints"
HOMEPAGE="
https://github.com/pydantic/pydantic/
https://pypi.org/project/pydantic/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
>=dev-python/annotated-types-0.6.0[${PYTHON_USEDEP}]
~dev-python/pydantic-core-2.33.2[${PYTHON_USEDEP}]
>=dev-python/typing-extensions-4.12.2[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.0[${PYTHON_USEDEP}]
dev-python/tzdata[${PYTHON_USEDEP}]
"
BDEPEND="
>=dev-python/hatch-fancy-pypi-readme-22.5.0[${PYTHON_USEDEP}]
test? (
$(python_gen_cond_dep '
dev-python/cloudpickle[${PYTHON_USEDEP}]
' 'python3*')
dev-python/dirty-equals[${PYTHON_USEDEP}]
>=dev-python/email-validator-2.0.0[${PYTHON_USEDEP}]
>=dev-python/faker-18.13.0[${PYTHON_USEDEP}]
>=dev-python/jsonschema-4.23.0[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/rich[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( pytest-mock )
distutils_enable_tests pytest
src_prepare() {
sed -i -e '/benchmark/d' pyproject.toml || die
distutils-r1_src_prepare
}
python_test() {
local EPYTEST_DESELECT=(
# -Werror, sigh
tests/test_types_typeddict.py::test_readonly_qualifier_warning
)
local EPYTEST_IGNORE=(
# require pytest-examples
tests/test_docs.py
# benchmarks
tests/benchmarks
)
if ! has_version "dev-python/cloudpickle[${PYTHON_USEDEP}]"; then
EPYTEST_IGNORE+=(
tests/test_pickle.py
)
fi
epytest
}

View File

@ -1,223 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( pypy3_11 python3_{11..13} )
PYDANTIC_CORE_PV=2.41.1
RUST_MIN_VER="1.75.0"
CRATES="
ahash@0.8.12
aho-corasick@1.1.3
autocfg@1.3.0
base64@0.22.1
bitflags@2.9.1
bitvec@1.0.1
bumpalo@3.19.0
cc@1.0.101
cfg-if@1.0.0
displaydoc@0.2.5
enum_dispatch@0.3.13
form_urlencoded@1.2.1
funty@2.0.0
getrandom@0.3.3
heck@0.5.0
hex@0.4.3
icu_collections@1.5.0
icu_locid@1.5.0
icu_locid_transform@1.5.0
icu_locid_transform_data@1.5.0
icu_normalizer@1.5.0
icu_normalizer_data@1.5.0
icu_properties@1.5.1
icu_properties_data@1.5.0
icu_provider@1.5.0
icu_provider_macros@1.5.0
idna@1.1.0
idna_adapter@1.2.0
indoc@2.0.5
itoa@1.0.11
jiter@0.11.0
js-sys@0.3.77
lexical-parse-float@1.0.5
lexical-parse-integer@1.0.5
lexical-util@1.0.6
libc@0.2.155
litemap@0.7.3
log@0.4.27
memchr@2.7.4
memoffset@0.9.1
num-bigint@0.4.6
num-integer@0.1.46
num-traits@0.2.19
once_cell@1.21.3
percent-encoding@2.3.1
portable-atomic@1.6.0
proc-macro2@1.0.86
pyo3-build-config@0.26.0
pyo3-ffi@0.26.0
pyo3-macros-backend@0.26.0
pyo3-macros@0.26.0
pyo3@0.26.0
python3-dll-a@0.2.14
quote@1.0.36
r-efi@5.2.0
radium@0.7.0
regex-automata@0.4.11
regex-syntax@0.8.5
regex@1.11.3
rustversion@1.0.17
ryu@1.0.18
serde@1.0.228
serde_core@1.0.228
serde_derive@1.0.228
serde_json@1.0.145
smallvec@1.15.1
speedate@0.17.0
stable_deref_trait@1.2.0
static_assertions@1.1.0
strum@0.27.2
strum_macros@0.27.2
syn@2.0.82
synstructure@0.13.1
tap@1.0.1
target-lexicon@0.13.2
tinystr@0.7.6
unicode-ident@1.0.12
unindent@0.2.3
url@2.5.4
utf16_iter@1.0.5
utf8_iter@1.0.4
uuid@1.18.1
version_check@0.9.5
wasi@0.14.2+wasi-0.2.4
wasm-bindgen-backend@0.2.100
wasm-bindgen-macro-support@0.2.100
wasm-bindgen-macro@0.2.100
wasm-bindgen-shared@0.2.100
wasm-bindgen@0.2.100
wit-bindgen-rt@0.39.0
write16@1.0.0
writeable@0.5.5
wyz@0.5.1
yoke-derive@0.7.4
yoke@0.7.4
zerocopy-derive@0.8.25
zerocopy@0.8.25
zerofrom-derive@0.1.4
zerofrom@0.1.4
zerovec-derive@0.10.3
zerovec@0.10.4
"
inherit cargo distutils-r1 pypi
DESCRIPTION="Data parsing and validation using Python type hints"
HOMEPAGE="
https://github.com/pydantic/pydantic/
https://pypi.org/project/pydantic/
"
# pydantic-core & pydantic have a perfect circular test dep now
SRC_URI+="
$(pypi_sdist_url pydantic-core "${PYDANTIC_CORE_PV}")
${CARGO_CRATE_URIS}
"
PYDANTIC_CORE_S=${WORKDIR}/pydantic_core-${PYDANTIC_CORE_PV}
LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
Apache-2.0-with-LLVM-exceptions MIT Unicode-3.0 Unicode-DFS-2016
|| ( Apache-2.0 Boost-1.0 )
"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
>=dev-python/annotated-types-0.6.0[${PYTHON_USEDEP}]
>=dev-python/typing-extensions-4.14.1[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.2[${PYTHON_USEDEP}]
dev-python/tzdata[${PYTHON_USEDEP}]
!dev-python/pydantic-core
"
BDEPEND="
>=dev-python/hatch-fancy-pypi-readme-22.5.0[${PYTHON_USEDEP}]
dev-util/maturin[${PYTHON_USEDEP}]
test? (
$(python_gen_cond_dep '
dev-python/cloudpickle[${PYTHON_USEDEP}]
' 'python3*')
dev-python/dirty-equals[${PYTHON_USEDEP}]
>=dev-python/email-validator-2.0.0[${PYTHON_USEDEP}]
>=dev-python/faker-18.13.0[${PYTHON_USEDEP}]
>=dev-python/jsonschema-4.23.0[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/rich[${PYTHON_USEDEP}]
)
"
# pydantic-core
BDEPEND+="
test? (
>=dev-python/dirty-equals-0.5.0[${PYTHON_USEDEP}]
>=dev-python/inline-snapshot-0.13.3[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.1[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( hypothesis pytest-mock )
distutils_enable_tests pytest
QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/pydantic_core/_pydantic_core.*.so"
src_prepare() {
sed -i -e '/benchmark/d' {.,"${PYDANTIC_CORE_S}"}/pyproject.toml || die
sed -i -e '/^strip/d' "${PYDANTIC_CORE_S}"/Cargo.toml || die
distutils-r1_src_prepare
}
python_compile() {
distutils-r1_python_compile
local DISTUTILS_USE_PEP517=maturin
local DISTUTILS_UPSTREAM_PEP517=maturin
cd "${PYDANTIC_CORE_S}" || die
distutils-r1_python_compile
cd - >/dev/null || die
}
python_test() {
local EPYTEST_DESELECT=(
# == pydantic ==
# -Werror, sigh
tests/test_types_typeddict.py::test_readonly_qualifier_warning
# == pydantic-core ==
# TODO: recursion till segfault
tests/serializers/test_functions.py::test_recursive_call
)
local EPYTEST_IGNORE=(
# require pytest-examples (pydantic)
tests/test_docs.py
# benchmarks (both)
tests/benchmarks
)
if ! has_version "dev-python/cloudpickle[${PYTHON_USEDEP}]"; then
EPYTEST_IGNORE+=(
# (pydantic)
tests/test_pickle.py
)
fi
cd "${PYDANTIC_CORE_S}" || die
rm -rf pydantic_core || die
# tests link to libpython, so they fail to link on pypy3
[[ ${EPYTHON} != pypy3* ]] && cargo_src_test
epytest -o xfail_strict=False -o addopts=
cd - 2>/dev/null || die
epytest
}

View File

@ -1,231 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=hatchling
# no provenance for pydantic-core:
# https://github.com/pydantic/pydantic-core/issues/1842
PYPI_VERIFY_REPO=https://github.com/pydantic/pydantic
PYTHON_COMPAT=( pypy3_11 python3_{11..13} )
PYDANTIC_CORE_PV=2.41.3
RUST_MIN_VER="1.75.0"
CRATES="
ahash@0.8.12
aho-corasick@1.1.3
autocfg@1.3.0
base64@0.22.1
bitflags@2.9.1
bitvec@1.0.1
bumpalo@3.19.0
cc@1.0.101
cfg-if@1.0.0
displaydoc@0.2.5
enum_dispatch@0.3.13
form_urlencoded@1.2.1
funty@2.0.0
getrandom@0.3.3
heck@0.5.0
hex@0.4.3
icu_collections@1.5.0
icu_locid@1.5.0
icu_locid_transform@1.5.0
icu_locid_transform_data@1.5.0
icu_normalizer@1.5.0
icu_normalizer_data@1.5.0
icu_properties@1.5.1
icu_properties_data@1.5.0
icu_provider@1.5.0
icu_provider_macros@1.5.0
idna@1.1.0
idna_adapter@1.2.0
indoc@2.0.5
itoa@1.0.11
jiter@0.11.0
js-sys@0.3.77
lexical-parse-float@1.0.5
lexical-parse-integer@1.0.5
lexical-util@1.0.6
libc@0.2.155
litemap@0.7.3
log@0.4.27
memchr@2.7.4
memoffset@0.9.1
num-bigint@0.4.6
num-integer@0.1.46
num-traits@0.2.19
once_cell@1.21.3
percent-encoding@2.3.1
portable-atomic@1.6.0
proc-macro2@1.0.86
pyo3-build-config@0.26.0
pyo3-ffi@0.26.0
pyo3-macros-backend@0.26.0
pyo3-macros@0.26.0
pyo3@0.26.0
python3-dll-a@0.2.14
quote@1.0.36
r-efi@5.2.0
radium@0.7.0
regex-automata@0.4.11
regex-syntax@0.8.5
regex@1.11.3
rustversion@1.0.17
ryu@1.0.18
serde@1.0.228
serde_core@1.0.228
serde_derive@1.0.228
serde_json@1.0.145
smallvec@1.15.1
speedate@0.17.0
stable_deref_trait@1.2.0
static_assertions@1.1.0
strum@0.27.2
strum_macros@0.27.2
syn@2.0.82
synstructure@0.13.1
tap@1.0.1
target-lexicon@0.13.2
tinystr@0.7.6
unicode-ident@1.0.12
unindent@0.2.3
url@2.5.4
utf16_iter@1.0.5
utf8_iter@1.0.4
uuid@1.18.1
version_check@0.9.5
wasi@0.14.2+wasi-0.2.4
wasm-bindgen-backend@0.2.100
wasm-bindgen-macro-support@0.2.100
wasm-bindgen-macro@0.2.100
wasm-bindgen-shared@0.2.100
wasm-bindgen@0.2.100
wit-bindgen-rt@0.39.0
write16@1.0.0
writeable@0.5.5
wyz@0.5.1
yoke-derive@0.7.4
yoke@0.7.4
zerocopy-derive@0.8.25
zerocopy@0.8.25
zerofrom-derive@0.1.4
zerofrom@0.1.4
zerovec-derive@0.10.3
zerovec@0.10.4
"
inherit cargo distutils-r1 pypi
DESCRIPTION="Data parsing and validation using Python type hints"
HOMEPAGE="
https://github.com/pydantic/pydantic/
https://pypi.org/project/pydantic/
"
# pydantic-core & pydantic have a perfect circular test dep now
SRC_URI+="
$(pypi_sdist_url pydantic_core "${PYDANTIC_CORE_PV}")
${CARGO_CRATE_URIS}
"
PYDANTIC_CORE_S=${WORKDIR}/pydantic_core-${PYDANTIC_CORE_PV}
LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
Apache-2.0-with-LLVM-exceptions MIT Unicode-3.0 Unicode-DFS-2016
|| ( Apache-2.0 Boost-1.0 )
"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
>=dev-python/annotated-types-0.6.0[${PYTHON_USEDEP}]
>=dev-python/typing-extensions-4.14.1[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.2[${PYTHON_USEDEP}]
dev-python/tzdata[${PYTHON_USEDEP}]
!dev-python/pydantic-core
"
BDEPEND="
>=dev-python/hatch-fancy-pypi-readme-22.5.0[${PYTHON_USEDEP}]
dev-util/maturin[${PYTHON_USEDEP}]
test? (
$(python_gen_cond_dep '
dev-python/cloudpickle[${PYTHON_USEDEP}]
' 'python3*')
dev-python/dirty-equals[${PYTHON_USEDEP}]
>=dev-python/email-validator-2.0.0[${PYTHON_USEDEP}]
>=dev-python/faker-18.13.0[${PYTHON_USEDEP}]
>=dev-python/jsonschema-4.23.0[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/rich[${PYTHON_USEDEP}]
)
"
# pydantic-core
BDEPEND+="
test? (
>=dev-python/dirty-equals-0.5.0[${PYTHON_USEDEP}]
>=dev-python/inline-snapshot-0.13.3[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.1[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( hypothesis pytest-mock )
distutils_enable_tests pytest
QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/pydantic_core/_pydantic_core.*.so"
src_unpack() {
pypi_src_unpack
cargo_src_unpack
}
src_prepare() {
sed -i -e '/benchmark/d' {.,"${PYDANTIC_CORE_S}"}/pyproject.toml || die
sed -i -e '/^strip/d' "${PYDANTIC_CORE_S}"/Cargo.toml || die
distutils-r1_src_prepare
}
python_compile() {
distutils-r1_python_compile
local DISTUTILS_USE_PEP517=maturin
local DISTUTILS_UPSTREAM_PEP517=maturin
cd "${PYDANTIC_CORE_S}" || die
distutils-r1_python_compile
cd - >/dev/null || die
}
python_test() {
local EPYTEST_DESELECT=(
# == pydantic ==
# -Werror, sigh
tests/test_types_typeddict.py::test_readonly_qualifier_warning
# == pydantic-core ==
# TODO: recursion till segfault
tests/serializers/test_functions.py::test_recursive_call
)
local EPYTEST_IGNORE=(
# require pytest-examples (pydantic)
tests/test_docs.py
# benchmarks (both)
tests/benchmarks
)
if ! has_version "dev-python/cloudpickle[${PYTHON_USEDEP}]"; then
EPYTEST_IGNORE+=(
# (pydantic)
tests/test_pickle.py
)
fi
cd "${PYDANTIC_CORE_S}" || die
rm -rf pydantic_core || die
# tests link to libpython, so they fail to link on pypy3
[[ ${EPYTHON} != pypy3* ]] && cargo_src_test
epytest -o xfail_strict=False -o addopts=
cd - 2>/dev/null || die
epytest
}

View File

@ -1,231 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=hatchling
# no provenance for pydantic-core:
# https://github.com/pydantic/pydantic-core/issues/1842
PYPI_VERIFY_REPO=https://github.com/pydantic/pydantic
PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
PYDANTIC_CORE_PV=2.41.4
RUST_MIN_VER="1.75.0"
CRATES="
ahash@0.8.12
aho-corasick@1.1.3
autocfg@1.3.0
base64@0.22.1
bitflags@2.9.1
bitvec@1.0.1
bumpalo@3.19.0
cc@1.0.101
cfg-if@1.0.0
displaydoc@0.2.5
enum_dispatch@0.3.13
form_urlencoded@1.2.1
funty@2.0.0
getrandom@0.3.3
heck@0.5.0
hex@0.4.3
icu_collections@1.5.0
icu_locid@1.5.0
icu_locid_transform@1.5.0
icu_locid_transform_data@1.5.0
icu_normalizer@1.5.0
icu_normalizer_data@1.5.0
icu_properties@1.5.1
icu_properties_data@1.5.0
icu_provider@1.5.0
icu_provider_macros@1.5.0
idna@1.1.0
idna_adapter@1.2.0
indoc@2.0.5
itoa@1.0.11
jiter@0.11.0
js-sys@0.3.77
lexical-parse-float@1.0.5
lexical-parse-integer@1.0.5
lexical-util@1.0.6
libc@0.2.155
litemap@0.7.3
log@0.4.27
memchr@2.7.4
memoffset@0.9.1
num-bigint@0.4.6
num-integer@0.1.46
num-traits@0.2.19
once_cell@1.21.3
percent-encoding@2.3.1
portable-atomic@1.6.0
proc-macro2@1.0.86
pyo3-build-config@0.26.0
pyo3-ffi@0.26.0
pyo3-macros-backend@0.26.0
pyo3-macros@0.26.0
pyo3@0.26.0
python3-dll-a@0.2.14
quote@1.0.36
r-efi@5.2.0
radium@0.7.0
regex-automata@0.4.11
regex-syntax@0.8.5
regex@1.11.3
rustversion@1.0.17
ryu@1.0.18
serde@1.0.228
serde_core@1.0.228
serde_derive@1.0.228
serde_json@1.0.145
smallvec@1.15.1
speedate@0.17.0
stable_deref_trait@1.2.0
static_assertions@1.1.0
strum@0.27.2
strum_macros@0.27.2
syn@2.0.82
synstructure@0.13.1
tap@1.0.1
target-lexicon@0.13.2
tinystr@0.7.6
unicode-ident@1.0.12
unindent@0.2.3
url@2.5.4
utf16_iter@1.0.5
utf8_iter@1.0.4
uuid@1.18.1
version_check@0.9.5
wasi@0.14.2+wasi-0.2.4
wasm-bindgen-backend@0.2.100
wasm-bindgen-macro-support@0.2.100
wasm-bindgen-macro@0.2.100
wasm-bindgen-shared@0.2.100
wasm-bindgen@0.2.100
wit-bindgen-rt@0.39.0
write16@1.0.0
writeable@0.5.5
wyz@0.5.1
yoke-derive@0.7.4
yoke@0.7.4
zerocopy-derive@0.8.25
zerocopy@0.8.25
zerofrom-derive@0.1.4
zerofrom@0.1.4
zerovec-derive@0.10.3
zerovec@0.10.4
"
inherit cargo distutils-r1 pypi
DESCRIPTION="Data parsing and validation using Python type hints"
HOMEPAGE="
https://github.com/pydantic/pydantic/
https://pypi.org/project/pydantic/
"
# pydantic-core & pydantic have a perfect circular test dep now
SRC_URI+="
$(pypi_sdist_url pydantic_core "${PYDANTIC_CORE_PV}")
${CARGO_CRATE_URIS}
"
PYDANTIC_CORE_S=${WORKDIR}/pydantic_core-${PYDANTIC_CORE_PV}
LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
Apache-2.0-with-LLVM-exceptions MIT Unicode-3.0 Unicode-DFS-2016
|| ( Apache-2.0 Boost-1.0 )
"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
>=dev-python/annotated-types-0.6.0[${PYTHON_USEDEP}]
>=dev-python/typing-extensions-4.14.1[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.2[${PYTHON_USEDEP}]
dev-python/tzdata[${PYTHON_USEDEP}]
!dev-python/pydantic-core
"
BDEPEND="
>=dev-python/hatch-fancy-pypi-readme-22.5.0[${PYTHON_USEDEP}]
dev-util/maturin[${PYTHON_USEDEP}]
test? (
$(python_gen_cond_dep '
dev-python/cloudpickle[${PYTHON_USEDEP}]
' 'python3*')
dev-python/dirty-equals[${PYTHON_USEDEP}]
>=dev-python/email-validator-2.0.0[${PYTHON_USEDEP}]
>=dev-python/faker-18.13.0[${PYTHON_USEDEP}]
>=dev-python/jsonschema-4.23.0[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/rich[${PYTHON_USEDEP}]
)
"
# pydantic-core
BDEPEND+="
test? (
>=dev-python/dirty-equals-0.5.0[${PYTHON_USEDEP}]
>=dev-python/inline-snapshot-0.13.3[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.1[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( hypothesis pytest-mock )
distutils_enable_tests pytest
QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/pydantic_core/_pydantic_core.*.so"
src_unpack() {
pypi_src_unpack
cargo_src_unpack
}
src_prepare() {
sed -i -e '/benchmark/d' {.,"${PYDANTIC_CORE_S}"}/pyproject.toml || die
sed -i -e '/^strip/d' "${PYDANTIC_CORE_S}"/Cargo.toml || die
distutils-r1_src_prepare
}
python_compile() {
distutils-r1_python_compile
local DISTUTILS_USE_PEP517=maturin
local DISTUTILS_UPSTREAM_PEP517=maturin
cd "${PYDANTIC_CORE_S}" || die
distutils-r1_python_compile
cd - >/dev/null || die
}
python_test() {
local EPYTEST_DESELECT=(
# == pydantic ==
# -Werror, sigh
tests/test_types_typeddict.py::test_readonly_qualifier_warning
# == pydantic-core ==
# TODO: recursion till segfault
tests/serializers/test_functions.py::test_recursive_call
)
local EPYTEST_IGNORE=(
# require pytest-examples (pydantic)
tests/test_docs.py
# benchmarks (both)
tests/benchmarks
)
if ! has_version "dev-python/cloudpickle[${PYTHON_USEDEP}]"; then
EPYTEST_IGNORE+=(
# (pydantic)
tests/test_pickle.py
)
fi
cd "${PYDANTIC_CORE_S}" || die
rm -rf pydantic_core || die
# tests link to libpython, so they fail to link on pypy3
[[ ${EPYTHON} != pypy3* ]] && cargo_src_test
epytest -o xfail_strict=False -o addopts=
cd - 2>/dev/null || die
epytest
}