blob: 19febc9cceb342877e30192f47c4eb28335144c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( python3_{12..14} )
inherit distutils-r1 optfeature pypi
DESCRIPTION="Extra Pydantic types"
HOMEPAGE="
https://github.com/pydantic/pydantic-extra-types
https://pypi.org/project/pydantic-extra-types/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
>=dev-python/pydantic-2.5.2[${PYTHON_USEDEP}]
dev-python/typing-extensions[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/phonenumbers[${PYTHON_USEDEP}]
dev-python/pycountry[${PYTHON_USEDEP}]
dev-python/semver[${PYTHON_USEDEP}]
dev-python/pymongo[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
EPYTEST_IGNORE=(
# Requires unpackaged cron-converter
tests/test_cron.py
tests/test_json_schema.py
# Requires unpackaged pendulum
tests/test_pendulum_dt.py
# Requires unpackaged python-ulid
tests/test_ulid.py
)
EPYTEST_DESELECT=(
# https://github.com/pydantic/pydantic-extra-types/issues/346
tests/test_coordinate.py::test_json_schema
)
pkg_postinst() {
optfeature_header "Optional type support"
optfeature "PhoneNumber" dev-python/phonenumbers
optfeature "language_code" dev-python/pycountry
optfeature "semantic_version" dev-python/semver
# optfeature "ulid" python-ulid
# optfeature "pendulum_dt" pendulum
optfeature "mongo_object_id" dev-python/pymongo
# optfeature "cron" cron-converter
}
|